diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php index acc8fa6be11c..78554e282a47 100644 --- a/lib/private/group/manager.php +++ b/lib/private/group/manager.php @@ -228,7 +228,10 @@ public function getUserIdGroups($uid) { $groupIds = $backend->getUserGroups($uid); if (is_array($groupIds)) { foreach ($groupIds as $groupId) { - $groups[$groupId] = $this->get($groupId); + $groupInstance = $this->get($groupId); + if($groupInstance != null) { + $groups[$groupId] = $groupInstance; + } } } }