modUser.loadAttributes
Последнее обновление 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::loadAttributes¶
Загружает основные атрибуты, которые определяют профиль безопасности modUser.
Синтаксис¶
void loadAttributes (mixed $target, [string $context = ''], [boolean $reload = false])
$target — имя класса или массив имён классов modAccess*, права которых нужно загрузить, а не класс ресурса или контекста. По умолчанию $context — текущий контекст; $reload сбрасывает значения, закэшированные в сессии.
Пример¶
Загрузить права групп ресурсов для контекста ‘sports’.
$user->loadAttributes([\MODX\Revolution\modAccessResourceGroup::class], 'sports', true);
Смотрите также¶
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










