summaryrefslogtreecommitdiffstats
path: root/lib/private/group
diff options
context:
space:
mode:
authormacjohnny <estebanmarin@gmx.ch>2014-06-21 16:06:11 +0200
committermacjohnny <estebanmarin@gmx.ch>2014-06-21 16:06:11 +0200
commit405e89f45a515a825efdb673326f57e661331b19 (patch)
tree4182e2da4d92a7be9ebbd18647a0eb7f60221b01 /lib/private/group
parent6a3d6d3e4b2107e4e9612146006237cd8fa5f253 (diff)
downloadnextcloud-server-405e89f45a515a825efdb673326f57e661331b19.tar.gz
nextcloud-server-405e89f45a515a825efdb673326f57e661331b19.zip
Update manager.php
Diffstat (limited to 'lib/private/group')
-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();
});
}