Jump to main content Jump to doc navigation

modUser::getSessionContexts

Returns an array of user session context keys.

Syntax

API Doc: http://api.modx.com/revolution/2.2/db_core_model_modx_moduser.class.html#%5CmodUser::getSessionContexts()

array getSessionContexts ()

Example

Get all user seesion contexts for this user that is logged into the web and mgr contexts:

$keys = $user->getSessionContexts();
print_r($keys); // prints Array ( 'web', 'mgr' );

See Also