aboutsummaryrefslogtreecommitdiffstats
path: root/core/Application.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-04-27 15:43:34 +0200
committerRobin Appelman <robin@icewind.nl>2021-04-27 20:29:51 +0200
commited2d02d5f1000c76776c6e8dbe24fa787ffe6d0d (patch)
treeea8a4030a698abd0bfe7c797976d474972332345 /core/Application.php
parent9de6efd14e4fd8bbf3c9cacde7524b205ca7e93e (diff)
downloadnextcloud-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.php4
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);
}
}