modUser.leaveGroup
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::leaveGroup¶
Deletes the modUserGroupMember row that links this User to the group.
Leaving a group the User is not in is logged as an error, and the method returns false. A successful removal clears the cached group id and name lists in the session, so the next getUserGroups() call sees the change.
Syntax¶
boolean leaveGroup (mixed $groupId)
-
$groupId(mixed) Group name (string) or group id to leave.
Example¶
$user->leaveGroup('staff');
$user->leaveGroup(5);
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










