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

View file

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