diff options
author | Bart Visscher <bartv@thisnet.nl> | 2014-02-27 19:12:03 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2014-02-27 19:12:03 +0100 |
commit | 00e27d5343dab36380129dd8d30e2699e5121079 (patch) | |
tree | 0ec7cdb2ee1757271de9dd142fbd8eda4fa8ec2c /lib | |
parent | 1d7564dc2f4ec9e06f9047846cd6bf023a1c26ed (diff) | |
download | nextcloud-server-00e27d5343dab36380129dd8d30e2699e5121079.tar.gz nextcloud-server-00e27d5343dab36380129dd8d30e2699e5121079.zip |
Clear the cached user groups when a group is deleted
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/group/manager.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php index 451de0c0539..deceb8bb929 100644 --- a/lib/private/group/manager.php +++ b/lib/private/group/manager.php @@ -52,12 +52,14 @@ class Manager extends PublicEmitter { */ public function __construct($userManager) { $this->userManager = $userManager; - $cache = & $this->cachedGroups; - $this->listen('\OC\Group', 'postDelete', function ($group) use (&$cache) { + $cachedGroups = & $this->cachedGroups; + $cachedUserGroups = & $this->cachedUserGroups; + $this->listen('\OC\Group', 'postDelete', function ($group) use (&$cachedGroups, &$cachedUserGroups) { /** * @var \OC\Group\Group $group */ - unset($cache[$group->getGID()]); + unset($cachedGroups[$group->getGID()]); + $cachedUserGroups = array(); }); } |