diff options
-rw-r--r-- | lib/private/group/manager.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php index ae20af7448f..9bb5b39c794 100644 --- a/lib/private/group/manager.php +++ b/lib/private/group/manager.php @@ -182,10 +182,10 @@ class Manager extends PublicEmitter { foreach ($this->backends as $backend) { $groupIds = $backend->getUserGroups($uid); foreach ($groupIds as $groupId) { - $groups[] = $this->get($groupId); + $groups[$groupId] = $this->get($groupId); } } - $this->cachedUserGroups[$uid] = $groups; + $this->cachedUserGroups[$uid] = array_values($groups); return $this->cachedUserGroups[$uid]; } |