Manual:Hooks/UserRights

Details

 * $user  : User or UserRightsProxy object that was changed
 * $add  : Array of strings corresponding to groups added
 * $remove: Array of strings corresponding to groups removed

If the $user parameter was a UserRightsProxy object, this user rights change was performed on a different wiki. This means that you might be mislead into identifying a user based on information such a name or ID because they do not share that attribute on the local wiki - it will almost certainly point to a different user entirely.