diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2016-02-23 15:12:01 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2016-02-26 02:09:25 +0100 |
commit | 36a8f22dc302645852ad006af41d412693524982 (patch) | |
tree | 95da598daf04f7f9352d1e73acef5833f6445a2e | |
parent | 696ee349eab86882f15b85b7e3f840a0cf7749a8 (diff) | |
download | nextcloud-server-36a8f22dc302645852ad006af41d412693524982.tar.gz nextcloud-server-36a8f22dc302645852ad006af41d412693524982.zip |
take the first result of that array, if present. Fixes 2nd display name to be 'Array', if cache is configured and enabled.
-rw-r--r-- | apps/user_ldap/lib/access.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 6e72ec1439c..09f808f8d0e 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -543,8 +543,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); } } |