MediaWiki REL1_37
MediaWiki\User\Hook\UserGroupsChangedHook Interface Reference

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

Inheritance diagram for MediaWiki\User\Hook\UserGroupsChangedHook:

Public Member Functions

 onUserGroupsChanged ( $user, $added, $removed, $performer, $reason, $oldUGMs, $newUGMs)
 This hook is called after user groups are changed.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 15 of file UserGroupsChangedHook.php.

Member Function Documentation

◆ onUserGroupsChanged()

MediaWiki\User\Hook\UserGroupsChangedHook::onUserGroupsChanged (   $user,
  $added,
  $removed,
  $performer,
  $reason,
  $oldUGMs,
  $newUGMs 
)

This hook is called after user groups are changed.

Since
1.35
Parameters
User$userUser whose groups changed
string[]$addedGroups added
string[]$removedGroups removed
User | false$performerUser who performed the change, false if via autopromotion
string | false$reasonThe reason, if any, given by the user performing the change, false if via autopromotion.
UserGroupMembership[]$oldUGMsAn associative array (group name => UserGroupMembership) of the user's group memberships before the change.
UserGroupMembership[]$newUGMsAn associative array (group name => UserGroupMembership) of the user's current group memberships.
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: