modUser.loadAttributes
Last updated Apr 6th, 2019 | Page history | Improve this page | Report an issue
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¶
Loads the attributes that define the User's security profile.
Syntax¶
void loadAttributes (mixed $target, [string $context = ''], [boolean $reload = false])
| Parameter | Description |
|---|---|
$target |
One modAccess* class name or an array of them — not a Resource or Context class |
$context |
Context to load for; current Context by default |
$reload |
true — discard session-cached values; false (default) |
Example¶
Load Resource Group permissions for the 'sports' Context:
$user->loadAttributes([\MODX\Revolution\modAccessResourceGroup::class], 'sports', true);
See Also¶
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










