return only existing users in group

This commit is contained in:
Arthur Schiwon 2013-08-18 17:30:16 +02:00
parent c7af26ec84
commit 0f7fad7166
1 changed files with 12 additions and 3 deletions

View File

@ -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);