flatten result array as expected by following code

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2020-11-26 23:36:04 +01:00 committed by backportbot[bot]
parent 9305a00414
commit d818975d84
1 changed files with 7 additions and 2 deletions

View File

@ -170,9 +170,14 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
if (count($filterParts) > 0) {
$filter = $this->access->combineFilterWithOr($filterParts);
$users = $this->access->fetchListOfUsers($filter, $requestAttributes, count($filterParts));
$dns = array_merge($dns, $users);
$dns = array_reduce($users, function (array $carry, array $record) {
if (!in_array($carry, $record['dn'][0])) {
$carry[$record['dn'][0]] = 1;
}
return $carry;
}, $dns);
}
$members = $dns;
$members = array_keys($dns);
break;
}