Skip to content
Snippets Groups Projects
Commit 0f7fad71 authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

return only existing users in group

parent c7af26ec
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment