summaryrefslogtreecommitdiffstats
path: root/lib/private/group/manager.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2014-02-27 20:09:07 +0100
committerBart Visscher <bartv@thisnet.nl>2014-02-27 20:09:07 +0100
commitcb37a2716a75013dd79f8830a6d074e5afebb767 (patch)
tree62222a8b1986ab4701574f9fc60bbf8e096ec067 /lib/private/group/manager.php
parent00e27d5343dab36380129dd8d30e2699e5121079 (diff)
downloadnextcloud-server-cb37a2716a75013dd79f8830a6d074e5afebb767.tar.gz
nextcloud-server-cb37a2716a75013dd79f8830a6d074e5afebb767.zip
Also clear cached UserGroup when a user is added/removed
Diffstat (limited to 'lib/private/group/manager.php')
-rw-r--r--lib/private/group/manager.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php
index deceb8bb929..151b185dbf7 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -61,6 +61,18 @@ class Manager extends PublicEmitter {
unset($cachedGroups[$group->getGID()]);
$cachedUserGroups = array();
});
+ $this->listen('\OC\Group', 'postAddUser', function ($group) use (&$cachedUserGroups) {
+ /**
+ * @var \OC\Group\Group $group
+ */
+ $cachedUserGroups = array();
+ });
+ $this->listen('\OC\Group', 'postRemoveUser', function ($group) use (&$cachedUserGroups) {
+ /**
+ * @var \OC\Group\Group $group
+ */
+ $cachedUserGroups = array();
+ });
}
/**