Skip to content

Commit

Permalink
Properly search for users when limittogroups is enabled
Browse files Browse the repository at this point in the history
Searching just for the uid is not enough.
This makes sure this done properly again now.

Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer authored and MorrisJobke committed Aug 21, 2020
1 parent 6e4b089 commit 51922ca
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/private/Collaboration/Collaborators/UserPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,15 @@ public function search($search, $limit, $offset, ISearchResult $searchResult) {
$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 {
Expand Down

0 comments on commit 51922ca

Please sign in to comment.