diff options
Diffstat (limited to 'apps/user_ldap/user_ldap.php')
-rw-r--r-- | apps/user_ldap/user_ldap.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 3188a46ffa3..e2b295f617f 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -184,6 +184,7 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface { } //getting dn, if false the user does not exist. If dn, he may be mapped only, requires more checking. $user = $this->access->userManager->get($uid); + if(is_null($user)) { \OCP\Util::writeLog('user_ldap', 'No DN found for '.$uid.' on '. $this->access->connection->ldapHost, \OCP\Util::DEBUG); @@ -236,16 +237,16 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface { * @return string|bool */ public function getHome($uid) { - // user Exists check required as it is not done in user proxy! - if(!$this->userExists($uid)) { - return false; - } - if(isset($this->homesToKill[$uid]) && !empty($this->homesToKill[$uid])) { //a deleted user who needs some clean up return $this->homesToKill[$uid]; } + // user Exists check required as it is not done in user proxy! + if(!$this->userExists($uid)) { + return false; + } + $cacheKey = 'getHome'.$uid; if($this->access->connection->isCached($cacheKey)) { return $this->access->connection->getFromCache($cacheKey); |