]> source.dussan.org Git - nextcloud-server.git/commitdiff
dn needs to be fetched to be able to detect memberOf support
authorArthur Schiwon <blizzz@owncloud.com>
Fri, 26 Sep 2014 13:36:49 +0000 (15:36 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Fri, 26 Sep 2014 13:36:49 +0000 (15:36 +0200)
apps/user_ldap/lib/wizard.php

index 7f0d32ead68a3707782ebb992e8f6c8b32ebe6d4..e2a85ea5eb9f0c38b5dc4ad60a08639aaa395686 100644 (file)
@@ -377,9 +377,11 @@ class Wizard extends LDAPUtility {
                $limit = 400;
                $offset = 0;
                do {
-                       $result = $this->access->searchGroups($filter, array('cn'), $limit, $offset);
+                       // we need to request dn additionally here, otherwise memberOf
+                       // detection will fail later
+                       $result = $this->access->searchGroups($filter, array('cn', 'dn'), $limit, $offset);
                        foreach($result as $item) {
-                               $groupNames[] = $item[0];
+                               $groupNames[] = $item['cn'];
                                $groupEntries[] = $item;
                        }
                        $offset += $limit;