]> source.dussan.org Git - nextcloud-server.git/commitdiff
getXbyY can still return false, e.g. when using ldap write support
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Mon, 15 Jun 2020 19:48:27 +0000 (21:48 +0200)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Mon, 15 Jun 2020 19:48:27 +0000 (21:48 +0200)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/user_ldap/lib/Mapping/AbstractMapping.php

index 6fd07f5f483342f4ebab5b68bd13e97095688e2f..a4a3705e2238b333feba209379903d628a1ca709 100644 (file)
@@ -123,8 +123,7 @@ abstract class AbstractMapping {
         */
        public function getDNByName($name) {
                $dn = array_search($name, $this->cache);
-               if ($dn === false) {
-                       $dn = $this->getXbyY('ldap_dn', 'owncloud_name', $name);
+               if ($dn === false && $dn = $this->getXbyY('ldap_dn', 'owncloud_name', $name)) {
                        $this->cache[$dn] = $name;
                }
                return $dn;