LDAP: check if index is set, fix Notices

This commit is contained in:
Arthur Schiwon 2012-10-15 17:16:47 +02:00
parent 0b42d70259
commit 800fd5fd79

View file

@ -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;
}