the user is gone, userExists will not bring him back. But the user's folder needs to be deleted anyway

This commit is contained in:
Arthur Schiwon 2015-06-11 18:24:45 +02:00
parent cda9685c0e
commit 97127cd971
1 changed files with 6 additions and 5 deletions

View File

@ -198,6 +198,7 @@ class USER_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
}
//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);
@ -249,16 +250,16 @@ class USER_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
* @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);