aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-10-17 15:44:42 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-10-17 15:44:42 +0200
commitc6a06b151114b80b64661aec00d3624f00677d48 (patch)
treedf2950707b83d625e0b4f229794ddb0d5be4edc7 /apps
parent0353134a45665b0a79ffd84ad49250b315df78eb (diff)
downloadnextcloud-server-c6a06b151114b80b64661aec00d3624f00677d48.tar.gz
nextcloud-server-c6a06b151114b80b64661aec00d3624f00677d48.zip
fix(provisioning_api): Fix getting disabled users for group adminsfix/fix-disabled-user-list-for-subadmins
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps')
-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 = [];