summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2016-02-23 15:12:01 +0100
committerArthur Schiwon <blizzz@owncloud.com>2016-02-24 21:32:03 +0100
commitb9b85e32becfbd9ee5be40e673a153334422a31e (patch)
treecafb12428d27ac54dd8f408436b71a41d34c6d91
parentfaf65e73b778867d36f0e13dd1b0f1a4ef1f4723 (diff)
downloadnextcloud-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.php4
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);
}
}