[Pkg-owncloud-commits] [owncloud] 07/27: treat dn as any other attribute when building the search() return array
David Prévot
taffit at moszumanska.debian.org
Wed Oct 28 17:03:05 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.1.4RC2
in repository owncloud.
commit ba13cecb76439a91ec82c70f9f81e7db82ea89f1
Author: Arthur Schiwon <blizzz at owncloud.com>
Date: Thu Oct 8 21:18:34 2015 +0200
treat dn as any other attribute when building the search() return array
---
apps/user_ldap/group_ldap.php | 2 +-
apps/user_ldap/lib/access.php | 6 +++---
apps/user_ldap/user_ldap.php | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php
index a738653..e2b4666 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 585e0dc..e23f0a0 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 7d4d6cd..97fac7d 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) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list