Force reindexation of User::mRights. Hooks have the possibility to unset rights, leaving the array out of order.
This commit is contained in:
parent
4a790d0ae6
commit
50bcc3c8f5
1 changed files with 2 additions and 0 deletions
|
|
@ -1725,6 +1725,8 @@ class User {
|
|||
if ( is_null( $this->mRights ) ) {
|
||||
$this->mRights = self::getGroupPermissions( $this->getEffectiveGroups() );
|
||||
wfRunHooks( 'UserGetRights', array( $this, &$this->mRights ) );
|
||||
// Force reindexation of rights when a hook has unset one of them
|
||||
$this->mRights = array_values( $this->mRights );
|
||||
}
|
||||
return $this->mRights;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue