]> source.dussan.org Git - nextcloud-server.git/commitdiff
LDAP: announce that OC_USER_BACKEND_GET_DISPLAYNAME is implemented, fixes #1727
authorArthur Schiwon <blizzz@owncloud.com>
Sat, 16 Feb 2013 01:06:45 +0000 (02:06 +0100)
committerArthur Schiwon <blizzz@owncloud.com>
Sat, 16 Feb 2013 01:06:45 +0000 (02:06 +0100)
apps/user_ldap/user_ldap.php

index 7778c37c7949506d1402fc582c9554a778907e25..50effd79c1fd36cc39dbf1afed1f8dd892d3fa7a 100644 (file)
@@ -221,7 +221,7 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
                        $this->connection->ldapUserDisplayName);
 
                if($displayName && (count($displayName) > 0)) {
-                       $this->connection->writeToCache($cacheKey, $displayName);
+                       $this->connection->writeToCache($cacheKey, $displayName[0]);
                        return $displayName[0];
                }
 
@@ -258,7 +258,10 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
        * compared with OC_USER_BACKEND_CREATE_USER etc.
        */
        public function implementsActions($actions) {
-               return (bool)((OC_USER_BACKEND_CHECK_PASSWORD | OC_USER_BACKEND_GET_HOME) & $actions);
+               return (bool)((OC_USER_BACKEND_CHECK_PASSWORD
+                       | OC_USER_BACKEND_GET_HOME
+                       | OC_USER_BACKEND_GET_DISPLAYNAME)
+                       & $actions);
        }
 
        /**