X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=blobdiff_plain;f=includes%2FUser.php;h=f2053711db66e15852dca1fd6b9c2e8ea0100758;hb=618bc84b626d9085fc61cce47aa6d371953882c2;hp=bb61e80823effa1f3d289b7dd9fbba6d9be77063;hpb=99257f5612deaad8e7f44450d2cd7df534360af5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/User.php b/includes/User.php index bb61e80823..f2053711db 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2712,7 +2712,11 @@ class User { // In case loadGroups was not called before, we now have the right twice. // Get rid of the duplicate. $this->mGroups = array_unique( $this->mGroups ); - $this->mRights = User::getGroupPermissions( $this->getEffectiveGroups( true ) ); + + // Refresh the groups caches, and clear the rights cache so it will be + // refreshed on the next call to $this->getRights(). + $this->getEffectiveGroups( true ); + $this->mRights = null; $this->invalidateCache(); } @@ -2742,7 +2746,11 @@ class User { } $this->loadGroups(); $this->mGroups = array_diff( $this->mGroups, array( $group ) ); - $this->mRights = User::getGroupPermissions( $this->getEffectiveGroups( true ) ); + + // Refresh the groups caches, and clear the rights cache so it will be + // refreshed on the next call to $this->getRights(). + $this->getEffectiveGroups( true ); + $this->mRights = null; $this->invalidateCache(); }