mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
fix: #45034 clear cached user groups on pre hooks
Signed-off-by: iLinaza <i.linaza@gmail.com>
This commit is contained in:
parent
bf0649de08
commit
d33cac0a2f
1 changed files with 3 additions and 3 deletions
|
|
@ -100,20 +100,20 @@ class Manager extends PublicEmitter implements IGroupManager {
|
|||
|
||||
$cachedGroups = &$this->cachedGroups;
|
||||
$cachedUserGroups = &$this->cachedUserGroups;
|
||||
$this->listen('\OC\Group', 'postDelete', function ($group) use (&$cachedGroups, &$cachedUserGroups) {
|
||||
$this->listen('\OC\Group', 'preDelete', function ($group) use (&$cachedGroups, &$cachedUserGroups) {
|
||||
/**
|
||||
* @var \OC\Group\Group $group
|
||||
*/
|
||||
unset($cachedGroups[$group->getGID()]);
|
||||
$cachedUserGroups = [];
|
||||
});
|
||||
$this->listen('\OC\Group', 'postAddUser', function ($group) use (&$cachedUserGroups) {
|
||||
$this->listen('\OC\Group', 'preAddUser', function ($group) use (&$cachedUserGroups) {
|
||||
/**
|
||||
* @var \OC\Group\Group $group
|
||||
*/
|
||||
$cachedUserGroups = [];
|
||||
});
|
||||
$this->listen('\OC\Group', 'postRemoveUser', function ($group) use (&$cachedUserGroups) {
|
||||
$this->listen('\OC\Group', 'preRemoveUser', function ($group) use (&$cachedUserGroups) {
|
||||
/**
|
||||
* @var \OC\Group\Group $group
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue