From a0249ae1a49b93dfd3197a97b0099f34b2b59651 Mon Sep 17 00:00:00 2001 From: Andreas Boehler Date: Tue, 30 Aug 2016 15:31:24 +0200 Subject: [PATCH] Fix a small bug when checking whether a user exists --- user_sql.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/user_sql.php b/user_sql.php index 814a836..4252c79 100644 --- a/user_sql.php +++ b/user_sql.php @@ -416,7 +416,12 @@ class OC_USER_SQL extends \OC_User_Backend implements \OCP\IUserBackend, \OCP\Us \OCP\Util::writeLog('OC_USER_SQL', "Entering userExists() for UID: $uid", \OCP\Util::DEBUG); - $uid = $this -> doUserDomainMapping($uid); + // Only if the domain is removed for internal user handling, + // we should add the domain back when checking existance + if($this -> settings['set_strip_domain'] === 'true') + { + $uid = $this -> doUserDomainMapping($uid); + } $exists = (bool)$this -> helper -> runQuery('userExists', array('uid' => $uid));; $this -> setCache ($cacheKey, $exists, 60);