diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2021-06-02 17:02:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-02 17:02:00 +0200 |
commit | d0cf20cc51c6f7d119d21d3ea3ed81b9b52f2c9d (patch) | |
tree | 09f3e75be13540a37771d5f4aad055c24019cc74 /lib/private/User | |
parent | ac4ff6c9e3bbbcf394b634a20374e0f20bef9744 (diff) | |
parent | ed2d02d5f1000c76776c6e8dbe24fa787ffe6d0d (diff) | |
download | nextcloud-server-d0cf20cc51c6f7d119d21d3ea3ed81b9b52f2c9d.tar.gz nextcloud-server-d0cf20cc51c6f7d119d21d3ea3ed81b9b52f2c9d.zip |
Merge pull request #26792 from nextcloud/user-delete-cleanup-files
better cleanup of user files on user deletion
Diffstat (limited to 'lib/private/User')
-rw-r--r-- | lib/private/User/User.php | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php index 5bc42a469d7..771cb431cbd 100644 --- a/lib/private/User/User.php +++ b/lib/private/User/User.php @@ -38,7 +38,6 @@ namespace OC\User; use OC\Accounts\AccountManager; use OC\Avatar\AvatarManager; -use OC\Files\Cache\Storage; use OC\Hooks\Emitter; use OC_Helper; use OCP\EventDispatcher\IEventDispatcher; @@ -221,8 +220,6 @@ class User implements IUser { $this->emitter->emit('\OC\User', 'preDelete', [$this]); } $this->dispatcher->dispatchTyped(new BeforeUserDeletedEvent($this)); - // get the home now because it won't return it after user deletion - $homePath = $this->getHome(); $result = $this->backend->deleteUser($this->uid); if ($result) { @@ -241,16 +238,6 @@ class User implements IUser { // Delete the user's keys in preferences \OC::$server->getConfig()->deleteAllUserValues($this->uid); - // Delete user files in /data/ - if ($homePath !== false) { - // FIXME: this operates directly on FS, should use View instead... - // also this is not testable/mockable... - \OC_Helper::rmdirr($homePath); - } - - // Delete the users entry in the storage table - Storage::remove('home::' . $this->uid); - \OC::$server->getCommentsManager()->deleteReferencesOfActor('users', $this->uid); \OC::$server->getCommentsManager()->deleteReadMarksFromUser($this); |