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 /core | |
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 'core')
-rw-r--r-- | core/Application.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Application.php b/core/Application.php index c3cb6f02ed5..fe65faeb9df 100644 --- a/core/Application.php +++ b/core/Application.php @@ -37,6 +37,7 @@ use OC\Authentication\Events\RemoteWipeStarted; use OC\Authentication\Listeners\RemoteWipeActivityListener; use OC\Authentication\Listeners\RemoteWipeEmailListener; use OC\Authentication\Listeners\RemoteWipeNotificationsListener; +use OC\Authentication\Listeners\UserDeletedFilesCleanupListener; use OC\Authentication\Listeners\UserDeletedStoreCleanupListener; use OC\Authentication\Listeners\UserDeletedTokenCleanupListener; use OC\Authentication\Notifications\Notifier as AuthenticationNotifier; @@ -49,6 +50,7 @@ use OC\DB\SchemaWrapper; use OCP\AppFramework\App; use OCP\EventDispatcher\IEventDispatcher; use OCP\IDBConnection; +use OCP\User\Events\BeforeUserDeletedEvent; use OCP\User\Events\UserDeletedEvent; use OCP\Util; use Symfony\Component\EventDispatcher\GenericEvent; @@ -270,5 +272,7 @@ class Application extends App { $eventDispatcher->addServiceListener(RemoteWipeFinished::class, RemoteWipeEmailListener::class); $eventDispatcher->addServiceListener(UserDeletedEvent::class, UserDeletedStoreCleanupListener::class); $eventDispatcher->addServiceListener(UserDeletedEvent::class, UserDeletedTokenCleanupListener::class); + $eventDispatcher->addServiceListener(BeforeUserDeletedEvent::class, UserDeletedFilesCleanupListener::class); + $eventDispatcher->addServiceListener(UserDeletedEvent::class, UserDeletedFilesCleanupListener::class); } } |