take the first result of that array, if present. Fixes 2nd display name to be 'Array', if cache is configured and enabled.

This commit is contained in:
Arthur Schiwon 2016-02-23 15:12:01 +01:00
parent faf65e73b7
commit b9b85e32be

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