From d467991b4846e7ed76cb17d9056af70727b466b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Wed, 19 Oct 2016 16:36:18 +0200 Subject: [PATCH 1/2] Remove some phpunit deprecation warnings --- .htaccess | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.htaccess b/.htaccess index bd9f5af3f707..befebe6c0b20 100644 --- a/.htaccess +++ b/.htaccess @@ -72,3 +72,7 @@ Options -Indexes ModPagespeed Off +#### DO NOT CHANGE ANYTHING ABOVE THIS LINE #### + +ErrorDocument 403 //core/templates/403.php +ErrorDocument 404 //core/templates/404.php From b2c21ba8c78f1330a299a0b5c060a54c3f4c668a Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 9 Jun 2015 14:53:06 +0200 Subject: [PATCH 2/2] Retrieve user home folder before deleting a user --- lib/private/User/User.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/private/User/User.php b/lib/private/User/User.php index 0350fba61397..f19a359579a4 100644 --- a/lib/private/User/User.php +++ b/lib/private/User/User.php @@ -197,6 +197,9 @@ public function delete() { if ($this->emitter) { $this->emitter->emit('\OC\User', 'preDelete', [$this]); } + // homeDir needs to be retrieved before the user is deleted - otherwise it isn't correct and the fallback is used + $homeDir = $this->getHome(); + $result = $this->backend->deleteUser($this->uid); if ($result) { @@ -210,7 +213,7 @@ public function delete() { \OC::$server->getConfig()->deleteAllUserValues($this->uid); // Delete user files in /data/ - \OC_Helper::rmdirr($this->getHome()); + \OC_Helper::rmdirr($homeDir); // Delete the users entry in the storage table Storage::remove('home::' . $this->uid);