From b9b85e32becfbd9ee5be40e673a153334422a31e Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 23 Feb 2016 15:12:01 +0100 Subject: [PATCH] take the first result of that array, if present. Fixes 2nd display name to be 'Array', if cache is configured and enabled. --- apps/user_ldap/lib/access.php | 4 ++-- 1 file 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); } } -- 2.39.5