modUser.addSessionContext
Последнее обновление Oct 11th, 2026 | История страницы | Улучшить эту страницу | Сообщить о проблеме
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn moremodUser::addSessionContext¶
Добавляет новый контекст в массив контекста сеанса пользователя.
Синтаксис¶
void addSessionContext (string $context)
Пример¶
Добавьте ‘sports’ контекст сессию для пользователя.
$modx->user->addSessionContext('sports');
addSessionContext — метод modUser, поэтому вызывайте его на объекте пользователя, а не на $modx.
Смотрите также¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










