mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
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
1 changed files with 9 additions and 1 deletions
|
|
@ -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 a new issue