Skip to content
Snippets Groups Projects
Unverified Commit 8261d7e0 authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #20772 from nextcloud/fix/sharee-integration-test

Properly search for users when limittogroups is enabled
parents 7c30b612 a0cbf16d
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,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 {
......
......@@ -328,7 +328,7 @@ class UserPluginTest extends TestCase {
['label' => 'Test One', 'value' => ['shareType' => IShare::TYPE_USER, 'shareWith' => 'test1'], 'status' => []],
['label' => 'Test Two', 'value' => ['shareType' => IShare::TYPE_USER, 'shareWith' => 'test2'], 'status' => []],
],
false,
true,
false,
[
['test1', $this->getUserMock('test1', 'Test One')],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment