aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-11-26 23:36:04 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2020-11-26 23:36:04 +0100
commit57bfe0d1f9a7dc5ad545a156c17ada1353fe6c94 (patch)
tree95f7c72668b2138aea10642e1232f6a8f3929e99 /apps/user_ldap
parentfad8dd39336036cff81353f8ae1f7526703a9b45 (diff)
downloadnextcloud-server-57bfe0d1f9a7dc5ad545a156c17ada1353fe6c94.tar.gz
nextcloud-server-57bfe0d1f9a7dc5ad545a156c17ada1353fe6c94.zip
flatten result array as expected by following code
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/Group_LDAP.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php
index 5444f0815e3..e396999f869 100644
--- a/apps/user_ldap/lib/Group_LDAP.php
+++ b/apps/user_ldap/lib/Group_LDAP.php
@@ -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;
}