Properly search for users when limittogroups is enabled
Searching just for the uid is not enough. This makes sure this done properly again now. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
687b37fa3c
commit
556440471a
|
@ -79,7 +79,15 @@ class UserPlugin implements ISearchPlugin {
|
|||
$usersInGroup = $this->groupManager->displayNamesInGroup($userGroupId, $search, $limit, $offset);
|
||||
foreach ($usersInGroup as $userId => $displayName) {
|
||||
$userId = (string) $userId;
|
||||
$users[$userId] = $this->userManager->get($userId);
|
||||
$user = $this->userManager->get($userId);
|
||||
if (!$user->isEnabled()) {
|
||||
// Ignore disabled users
|
||||
continue;
|
||||
}
|
||||
$users[$userId] = $user;
|
||||
}
|
||||
if (count($usersInGroup) >= $limit) {
|
||||
$hasMoreResults = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue