Skip to content

Commit 56dcfc4

Browse files
authored
Merge pull request #45036 from iLinaza/fix/45034-clear-cached-user-groups-on-pre-hooks
fix(usergroups): clear cached user groups on pre hooks
2 parents 7a96dbc + 842f3a4 commit 56dcfc4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/private/Group/Manager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ public function __construct(
6363
) {
6464
$this->displayNameCache = new DisplayNameCache($cacheFactory, $this);
6565

66-
$this->listen('\OC\Group', 'postDelete', function (IGroup $group): void {
66+
$this->listen('\OC\Group', 'preDelete', function (IGroup $group): void {
6767
unset($this->cachedGroups[$group->getGID()]);
6868
$this->cachedUserGroups = [];
6969
});
70-
$this->listen('\OC\Group', 'postAddUser', function (IGroup $group): void {
70+
$this->listen('\OC\Group', 'preAddUser', function (IGroup $group): void {
7171
$this->cachedUserGroups = [];
7272
});
73-
$this->listen('\OC\Group', 'postRemoveUser', function (IGroup $group): void {
73+
$this->listen('\OC\Group', 'preRemoveUser', function (IGroup $group): void {
7474
$this->cachedUserGroups = [];
7575
});
7676
}

0 commit comments

Comments
 (0)