Check whether the user exists before trying to set up his file system

This commit is contained in:
Joas Schilling 2015-06-05 11:31:49 +02:00
parent 3d289a58cd
commit 4e24486a89
2 changed files with 12 additions and 0 deletions

View file

@ -49,6 +49,12 @@ class Expire implements ICommand {
}
public function handle() {
$userManager = \OC::$server->getUserManager();
if (!$userManager->userExists($this->user)) {
// User has been deleted already
return;
}
\OC_Util::tearDownFS();
\OC_Util::setupFS($this->user);
Trashbin::expire($this->trashBinSize, $this->user);

View file

@ -50,6 +50,12 @@ class Expire implements ICommand {
public function handle() {
$userManager = \OC::$server->getUserManager();
if (!$userManager->userExists($this->user)) {
// User has been deleted already
return;
}
\OC_Util::setupFS($this->user);
Storage::expire($this->fileName, $this->versionsSize, $this->neededSpace);
\OC_Util::tearDownFS();