[Pkg-owncloud-commits] [owncloud] 304/457: Check whether the user exists before trying to set up his file system

David Prévot taffit at moszumanska.debian.org
Sun Jun 28 20:06:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 4e24486a89088d0053633f1f91739649c4f4ffda
Author: Joas Schilling <nickvergessen at owncloud.com>
Date:   Fri Jun 5 11:31:49 2015 +0200

    Check whether the user exists before trying to set up his file system
---
 apps/files_trashbin/command/expire.php | 6 ++++++
 apps/files_versions/command/expire.php | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/apps/files_trashbin/command/expire.php b/apps/files_trashbin/command/expire.php
index e617fa4..e7dd5c5 100644
--- a/apps/files_trashbin/command/expire.php
+++ b/apps/files_trashbin/command/expire.php
@@ -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);
diff --git a/apps/files_versions/command/expire.php b/apps/files_versions/command/expire.php
index 6cec9f4..ec9aa3e 100644
--- a/apps/files_versions/command/expire.php
+++ b/apps/files_versions/command/expire.php
@@ -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();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list