diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2013-08-18 17:30:16 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2013-08-19 11:48:21 +0200 |
commit | 0f7fad7166a97a1767a72d6a288027aaffeb65fb (patch) | |
tree | 06a264b0485313fe991c7505ac69ca9b79218898 | |
parent | c7af26ec84f2aecc8198f9a3a080950e89e5ec10 (diff) | |
download | nextcloud-server-0f7fad7166a97a1767a72d6a288027aaffeb65fb.tar.gz nextcloud-server-0f7fad7166a97a1767a72d6a288027aaffeb65fb.zip |
return only existing users in group
-rw-r--r-- | lib/group/group.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/group/group.php b/lib/group/group.php index a752c4311c1..c4ca7f1c0eb 100644 --- a/lib/group/group.php +++ b/lib/group/group.php @@ -75,7 +75,10 @@ class Group { } foreach ($userIds as $userId) { - $users[] = $this->userManager->get($userId); + $user = $this->userManager->get($userId); + if(!is_null($user)) { + $users[$userId] = $user; + } } $this->users = $users; return $users; @@ -173,7 +176,10 @@ class Group { $offset -= count($userIds); } foreach ($userIds as $userId) { - $users[$userId] = $this->userManager->get($userId); + $user = $this->userManager->get($userId); + if(!is_null($user)) { + $users[$userId] = $user; + } } if (!is_null($limit) and $limit <= 0) { return array_values($users); @@ -205,7 +211,10 @@ class Group { $offset -= count($userIds); } foreach ($userIds as $userId) { - $users[$userId] = $this->userManager->get($userId); + $user = $this->userManager->get($userId); + if(!is_null($user)) { + $users[$userId] = $user; + } } if (!is_null($limit) and $limit <= 0) { return array_values($users); |