diff options
author | Robin Appelman <robin@icewind.nl> | 2021-04-27 15:43:34 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-04-27 20:29:51 +0200 |
commit | ed2d02d5f1000c76776c6e8dbe24fa787ffe6d0d (patch) | |
tree | ea8a4030a698abd0bfe7c797976d474972332345 /core/Application.php | |
parent | 9de6efd14e4fd8bbf3c9cacde7524b205ca7e93e (diff) | |
download | nextcloud-server-ed2d02d5f1000c76776c6e8dbe24fa787ffe6d0d.tar.gz nextcloud-server-ed2d02d5f1000c76776c6e8dbe24fa787ffe6d0d.zip |
better cleanup of user files on user deletion
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'core/Application.php')
-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); } } |