modUser.setSudo
Last updated not available | 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::setSudo¶
Writes the sudo field directly and marks it dirty: set() refuses that key outside of setup. It always returns true and never hashes or validates anything.
A sudo user bypasses every Access Permissions check. The flag has an effect only after save().
Syntax¶
boolean setSudo (boolean $sudo)
-
$sudo(boolean) Value cast to boolean before it is stored.
Example¶
$user = $modx->getObject('modUser', array('username' => 'foobar'));
$user->setSudo(true);
$user->save();
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










