summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/group/manager.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php
index 9bb5b39c794..b91f6e53ebf 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -60,24 +60,32 @@ class Manager extends PublicEmitter {
$this->userManager = $userManager;
$cachedGroups = & $this->cachedGroups;
$cachedUserGroups = & $this->cachedUserGroups;
- $this->listen('\OC\Group', 'postDelete', function ($group) use (&$cachedGroups, &$cachedUserGroups) {
+ $cachedUserGroupIds = & $this->cachedUserGroupIds;
+ $this->listen('\OC\Group', 'postDelete', function ($group) use (&$cachedGroups, &$cachedUserGroups, &$cachedUserGroupIds) {
/**
* @var \OC\Group\Group $group
*/
unset($cachedGroups[$group->getGID()]);
$cachedUserGroups = array();
+ $Position = array_search($group->getGID(), $cachedUserGroupIds);
+ if($Position !== false)
+ {
+ unset($cachedUserGroupIds[$Position]);
+ }
});
- $this->listen('\OC\Group', 'postAddUser', function ($group) use (&$cachedUserGroups) {
+ $this->listen('\OC\Group', 'postAddUser', function ($group) use (&$cachedUserGroups, &$cachedUserGroupIds) {
/**
* @var \OC\Group\Group $group
*/
$cachedUserGroups = array();
+ $cachedUserGroupIds = array();
});
- $this->listen('\OC\Group', 'postRemoveUser', function ($group) use (&$cachedUserGroups) {
+ $this->listen('\OC\Group', 'postRemoveUser', function ($group) use (&$cachedUserGroups, &$cachedUserGroupIds) {
/**
* @var \OC\Group\Group $group
*/
$cachedUserGroups = array();
+ $cachedUserGroupIds = array();
});
}