modUser.remove
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::remove¶
Removes the User record and wraps the xPDO removal in the two User events. Both events run whenever the xpdo instance is a modX: OnUserRemove fires even when the parent removal returned false, unlike OnUserSave in save().
$ancestors carries the objects already removed in the current chain, which xPDO uses to break circular references. Top-level calls leave it empty.
Syntax¶
boolean remove ([array $ancestors = array()])
-
$ancestors(array) Already removed objects, by defaultarray().
Example¶
$user = $modx->getObject('modUser', array('username' => 'foobar'));
$user->remove();
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










