UserRightsProxy does not have an equals method, nor does
CentralAuthGroupMembershipProxy.
This reverts the problematic part of
80ca508ed117bbf547 which
caused fatal errors.
Bug: T88505
Change-Id: I6c1dfe14bc08193c33f86482c8f835500c0dc21c
/**
* Save user groups changes in the database.
*
- * @param User $user
+ * @param User|UserRightsProxy $user
* @param array $add Array of groups to add
* @param array $remove Array of groups to remove
* @param string $reason Reason for group change
global $wgAuth;
// Validate input set...
- $isself = $user->equals( $this->getUser() );
+ $isself = $user->getName() == $this->getUser()->getName();
$groups = $user->getGroups();
$changeable = $this->changeableGroups();
$addable = array_merge( $changeable['add'], $isself ? $changeable['add-self'] : array() );