diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2016-02-23 15:12:01 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2016-02-24 21:32:03 +0100 |
commit | b9b85e32becfbd9ee5be40e673a153334422a31e (patch) | |
tree | cafb12428d27ac54dd8f408436b71a41d34c6d91 | |
parent | faf65e73b778867d36f0e13dd1b0f1a4ef1f4723 (diff) | |
download | nextcloud-server-b9b85e32becfbd9ee5be40e673a153334422a31e.tar.gz nextcloud-server-b9b85e32becfbd9ee5be40e673a153334422a31e.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 16b942084c4..8b83b7d917f 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -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); } } |