We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fad8dd3 commit 57bfe0dCopy full SHA for 57bfe0d
1 file changed
apps/user_ldap/lib/Group_LDAP.php
@@ -170,9 +170,14 @@ public function inGroup($uid, $gid) {
170
if (count($filterParts) > 0) {
171
$filter = $this->access->combineFilterWithOr($filterParts);
172
$users = $this->access->fetchListOfUsers($filter, $requestAttributes, count($filterParts));
173
- $dns = array_merge($dns, $users);
+ $dns = array_reduce($users, function (array $carry, array $record) {
174
+ if (!in_array($carry, $record['dn'][0])) {
175
+ $carry[$record['dn'][0]] = 1;
176
+ }
177
+ return $carry;
178
+ }, $dns);
179
}
- $members = $dns;
180
+ $members = array_keys($dns);
181
break;
182
183
0 commit comments