Merge pull request #22599 from owncloud/fix_ldap-cache-2nd-displayname

take the first result of that array, if present. Fixes 2nd display na…
This commit is contained in:
Thomas Müller 2016-02-25 14:35:06 +01:00
commit dfaebc36d2
1 changed files with 2 additions and 2 deletions

View File

@ -546,8 +546,8 @@ class Access extends LDAPUtility implements user\IUserTools {
if(is_null($nameByLDAP)) {
continue;
}
$sndName = isset($ldapObject[$sndAttribute])
? $ldapObject[$sndAttribute] : '';
$sndName = isset($ldapObject[$sndAttribute][0])
? $ldapObject[$sndAttribute][0] : '';
$this->cacheUserDisplayName($ocName, $nameByLDAP, $sndName);
}
}