From 00e27d5343dab36380129dd8d30e2699e5121079 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Thu, 27 Feb 2014 19:12:03 +0100 Subject: Clear the cached user groups when a group is deleted --- lib/private/group/manager.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/private/group/manager.php') 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(); }); } -- cgit v1.2.3