MediaWiki master
MediaWiki\Hook\ChangeUserGroupsHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onChangeUserGroups ( $performer, $user, &$add, &$remove)
 This hook is called before user groups are changed.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "ChangeUserGroups" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 15 of file ChangeUserGroupsHook.php.

Member Function Documentation

◆ onChangeUserGroups()

MediaWiki\Hook\ChangeUserGroupsHook::onChangeUserGroups (   $performer,
  $user,
$add,
$remove 
)

This hook is called before user groups are changed.

Since
1.35
Parameters
User$performerThe User who will perform the change
User | UserIdentity$userThe User whose groups will be changed, for local group changes this is a User class, for interwiki group changes this was a UserRightsProxy until 1.40 and is a UserIdentity since 1.41
array&$addThe groups that will be added
array&$removeThe groups that will be removed
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: