getXbyY can still return false, e.g. when using ldap write support

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2020-06-15 21:48:27 +02:00 committed by backportbot[bot]
parent e5b468fb1a
commit 6f49974851
1 changed files with 1 additions and 2 deletions

View File

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