diff options
author | Bart Visscher <bartv@thisnet.nl> | 2014-02-27 20:09:07 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2014-02-27 20:09:07 +0100 |
commit | cb37a2716a75013dd79f8830a6d074e5afebb767 (patch) | |
tree | 62222a8b1986ab4701574f9fc60bbf8e096ec067 /lib/private/group/manager.php | |
parent | 00e27d5343dab36380129dd8d30e2699e5121079 (diff) | |
download | nextcloud-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.php | 12 |
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(); + }); } /** |