Check whether the user exists before trying to set up his file system
This commit is contained in:
parent
3d289a58cd
commit
4e24486a89
2 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue