dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't skip UserGetRights hook in addGroup/removeGroup
[lhc/web/wiklou.git]
/
includes
/
User.php
diff --git
a/includes/User.php
b/includes/User.php
index
bb61e80
..
f205371
100644
(file)
--- 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 );
// 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();
}
$this->invalidateCache();
}
@@
-2742,7
+2746,11
@@
class User {
}
$this->loadGroups();
$this->mGroups = array_diff( $this->mGroups, array( $group ) );
}
$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();
}
$this->invalidateCache();
}