Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-06-15 22:48:27 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-06-19 21:03:07 +0300
commit6f49974851b035736df78ecc5efed3bd162127ae (patch)
tree3fe3a8a68c59bc43749273cfc1e23292d77b403f /apps/user_ldap
parente5b468fb1abbae6b0daa4887fcf44dd182971184 (diff)
getXbyY can still return false, e.g. when using ldap write support
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/Mapping/AbstractMapping.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Mapping/AbstractMapping.php b/apps/user_ldap/lib/Mapping/AbstractMapping.php
index 6fd07f5f483..a4a3705e223 100644
--- a/apps/user_ldap/lib/Mapping/AbstractMapping.php
+++ b/apps/user_ldap/lib/Mapping/AbstractMapping.php
@@ -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;