summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-10-15 17:16:47 +0200
committerArthur Schiwon <blizzz@owncloud.com>2012-10-15 17:17:37 +0200
commit800fd5fd798567d899b1559ca3e91dc15212d027 (patch)
treeb3cafba8220518ad031ec13106ed2902ea9607c0
parent0b42d702590208ab687ba953f6b0516f6bd48975 (diff)
downloadnextcloud-server-800fd5fd798567d899b1559ca3e91dc15212d027.tar.gz
nextcloud-server-800fd5fd798567d899b1559ca3e91dc15212d027.zip
LDAP: check if index is set, fix Notices
-rw-r--r--apps/user_ldap/lib/access.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 66007d09536..a500e1bf5b4 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -339,7 +339,8 @@ abstract class Access {
$ownCloudNames = array();
foreach($ldapObjects as $ldapObject) {
- $ocname = $this->dn2ocname($ldapObject['dn'], $ldapObject[$nameAttribute], $isUsers);
+ $nameByLDAP = isset($ldapObject[$nameAttribute]) ? $ldapObject[$nameAttribute] : null;
+ $ocname = $this->dn2ocname($ldapObject['dn'], $nameByLDAP, $isUsers);
if($ocname) {
$ownCloudNames[] = $ocname;
}