Also clear cached UserGroup when a user is added/removed

This commit is contained in:
Bart Visscher 2014-02-27 20:09:07 +01:00
parent 00e27d5343
commit cb37a2716a
1 changed files with 12 additions and 0 deletions

View File

@ -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();
});
}
/**