summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-10-08 21:18:34 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-10-22 12:07:52 +0200
commitba13cecb76439a91ec82c70f9f81e7db82ea89f1 (patch)
tree5e8f5674d49dccdea7106ea7d33fbfba87291ff8 /apps
parent5412899665ce44b4092e5a990e5e2efa5bc24a06 (diff)
downloadnextcloud-server-ba13cecb76439a91ec82c70f9f81e7db82ea89f1.tar.gz
nextcloud-server-ba13cecb76439a91ec82c70f9f81e7db82ea89f1.zip
treat dn as any other attribute when building the search() return array
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/group_ldap.php2
-rw-r--r--apps/user_ldap/lib/access.php6
-rw-r--r--apps/user_ldap/user_ldap.php2
3 files changed, 5 insertions, 5 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php
index a7386534a75..e2b4666a63a 100644
--- a/apps/user_ldap/group_ldap.php
+++ b/apps/user_ldap/group_ldap.php
@@ -489,7 +489,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
array($this->access->connection->ldapGroupDisplayName, 'dn'));
if (is_array($groups)) {
foreach ($groups as $groupobj) {
- $groupDN = $groupobj['dn'];
+ $groupDN = $groupobj['dn'][0];
$allGroups[$groupDN] = $groupobj;
$nestedGroups = $this->access->connection->ldapNestedGroups;
if (!empty($nestedGroups)) {
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 585e0dc5b90..e23f0a03921 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -529,7 +529,7 @@ class Access extends LDAPUtility implements user\IUserTools {
$nameByLDAP = $ldapObject[$nameAttribute][0];
}
- $ocName = $this->dn2ocname($ldapObject['dn'], $nameByLDAP, $isUsers);
+ $ocName = $this->dn2ocname($ldapObject['dn'][0], $nameByLDAP, $isUsers);
if($ocName) {
$ownCloudNames[] = $ocName;
if($isUsers) {
@@ -696,7 +696,7 @@ class Access extends LDAPUtility implements user\IUserTools {
continue;
}
- $ocName = $this->dn2ocname($userRecord['dn'], $userRecord[$displayNameAttribute]);
+ $ocName = $this->dn2ocname($userRecord['dn'][0], $userRecord[$displayNameAttribute]);
if(!$ocName) {
// no user name, skip.
continue;
@@ -1022,7 +1022,7 @@ class Access extends LDAPUtility implements user\IUserTools {
$this->sanitizeDN($item[$key])
: $item[$key];
} else {
- $selection[$i][$key] = $this->sanitizeDN($item[$key]);
+ $selection[$i][$key] = [$this->sanitizeDN($item[$key])];
}
}
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 7d4d6cd2cb2..97fac7d85b5 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -101,7 +101,7 @@ class USER_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
} catch(\Exception $e) {
return false;
}
- $dn = $ldapRecord['dn'];
+ $dn = $ldapRecord['dn'][0];
$user = $this->access->userManager->get($dn);
if(!$user instanceof User) {