mirror of
https://github.com/nextcloud/server.git
synced 2026-06-06 23:34:22 -04:00
fix(provisioning_api): Fix getting disabled users for group admins
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
b2b1be0475
commit
f7185d8497
1 changed files with 4 additions and 4 deletions
|
|
@ -231,21 +231,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 = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue