aboutsummaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/lib/Controller/UsersController.php
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-10-29 11:34:06 +0100
committerGitHub <noreply@github.com>2024-10-29 11:34:06 +0100
commit11f0b0f817ff00dd7070d1ecd7adc3bea308914c (patch)
tree9da6a978dc4cb178ecc9d88219372484b5b2f4c8 /apps/provisioning_api/lib/Controller/UsersController.php
parented14f5fee2bc3c68d647bc789567619f288b5217 (diff)
parentc6a06b151114b80b64661aec00d3624f00677d48 (diff)
downloadnextcloud-server-11f0b0f817ff00dd7070d1ecd7adc3bea308914c.tar.gz
nextcloud-server-11f0b0f817ff00dd7070d1ecd7adc3bea308914c.zip
Merge pull request #48766 from nextcloud/fix/fix-disabled-user-list-for-subadmins
Diffstat (limited to 'apps/provisioning_api/lib/Controller/UsersController.php')
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php
index b02d3bb814e..b0cd9bfb448 100644
--- a/apps/provisioning_api/lib/Controller/UsersController.php
+++ b/apps/provisioning_api/lib/Controller/UsersController.php
@@ -235,21 +235,21 @@ class UsersController extends AUserData {
/* We have to handle offset ourselve for correctness */
$tempLimit = ($limit === null ? null : $limit + $offset);
foreach ($subAdminOfGroups as $group) {
- $users = array_merge(
+ $users = array_unique(array_merge(
$users,
array_map(
fn (IUser $user): string => $user->getUID(),
array_filter(
- $group->searchUsers($search, ($tempLimit === null ? null : $tempLimit - count($users))),
+ $group->searchUsers($search),
fn (IUser $user): bool => !$user->isEnabled()
)
)
- );
+ ));
if (($tempLimit !== null) && (count($users) >= $tempLimit)) {
break;
}
}
- $users = array_slice($users, $offset);
+ $users = array_slice($users, $offset, $limit);
}
$usersDetails = [];