$added: Groups added
$removed: Groups removed
$performer: User who performed the change, false if via autopromotion
+$reason: The reason, if any, given by the user performing the change,
+false if via autopromotion.
'UserIsBlockedFrom': Check if a user is blocked from a specific page (for
specific block exemptions).
$user->invalidateCache();
// update groups in external authentication database
- Hooks::run( 'UserGroupsChanged', array( $user, $add, $remove, $this->getUser() ) );
+ Hooks::run( 'UserGroupsChanged', array( $user, $add, $remove, $this->getUser(), $reason ) );
$wgAuth->updateExternalDBGroups( $user, $add, $remove );
wfDebug( 'oldGroups: ' . print_r( $oldGroups, true ) . "\n" );
$this->addGroup( $group );
}
// update groups in external authentication database
- Hooks::run( 'UserGroupsChanged', array( $this, $toPromote, array(), false ) );
+ Hooks::run( 'UserGroupsChanged', array( $this, $toPromote, array(), false, false ) );
$wgAuth->updateExternalDBGroups( $this, $toPromote );
$newGroups = array_merge( $oldGroups, $toPromote ); // all groups