< Manual:Hooks
UserRemoveGroup
Available from version 1.18.0 (r84134, codereview)
Called when removing a group from an user.
Define function:
public static function onUserRemoveGroup( $user, &$group ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"UserRemoveGroup": "MyExtensionHooks::onUserRemoveGroup"
	}
}
Called from: File(s): User.php
Interface: UserRemoveGroupHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:UserRemoveGroup extensions.

Details

Return false to override stock group removal.

  • $user: the user object that is to have a group removed
  • &$group: the group to be removed, can be modified
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.