We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60f4e84 commit 2dcb487Copy full SHA for 2dcb487
1 file changed
lib/private/Group/Manager.php
@@ -312,13 +312,10 @@ public function getUserGroups(?IUser $user = null): array {
312
public function getUserIdGroups(string $uid): array {
313
$groups = [];
314
315
- foreach ($this->getUserIdGroupIds($uid) as $groupId) {
316
- $aGroup = $this->get($groupId);
317
- if ($aGroup instanceof IGroup) {
318
- $groups[$groupId] = $aGroup;
319
- } else {
320
- $this->logger->debug('User "' . $uid . '" belongs to deleted group: "' . $groupId . '"', ['app' => 'core']);
321
- }
+ $groupIds = $this->getUserIdGroupIds($uid);
+ $newGroups = $this->getGroupsObjects($groupIds);
+ foreach ($newGroups as $groupId => $group) {
+ $groups[$groupId] = $group;
322
}
323
324
return $groups;
0 commit comments