< Manual:Hooks
| ChangeUserGroups | |
|---|---|
| Available from version 1.29.0 (Gerrit change 329727) Called before a user's group memberships are changed | |
| Define function: | public static function onChangeUserGroups( $performer, $user, &$add, &$remove ) { ... }
|
| Attach hook: | In extension.json:
{
"Hooks": {
"ChangeUserGroups": "MyExtensionHooks::onChangeUserGroups"
}
}
|
| Called from: | File(s): specials/SpecialUserrights.php |
| Interface: | ChangeUserGroupsHook.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ChangeUserGroups extensions.
Details
This occurs before a user's group memberships are changed.
- $performer: The User who will perform the change
- $user: The User whose groups will be changed
- &$add: The groups that will be added
- &$remove: The groups that will be removed
See also
- UserGroupsChanged
- UserRights
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.