Jump to main content Jump to doc navigation


Determines if this user is authenticated in a specific context.

Separate session contexts can allow users to login/out of specific sub-sites individually (or in collections).


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

boolean isAuthenticated ([string $sessionContext = 'web'])


See if the User is logged into the 'web' context. If not, deny access and send to Unauthorized Page.

if (!$modx->user->isAuthenticated('web')) {

See Also