Jump to main content Jump to doc navigation

modUser.addSessionContext

Other versions: 2.x (current) — Other languages: EN RU — Found a problem? Please edit this page or report an issue.

modUser::addSessionContext

Adds a new context to the user session context array.

Syntax

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

void addSessionContext (string $context)

Example

Add a 'sports' Context session to the user.

$modx->addSessionContext('sports');

See Also