diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-07-02 14:58:48 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2019-07-02 21:59:23 +0200 |
commit | c50fe2a9c9786247ef31aad855813b377ed33e89 (patch) | |
tree | 0483276f1b71d98971e700979726193f6a1c0805 /core/Application.php | |
parent | 63c64bf042b2b34450afc210a73ec7e6d2cbfa80 (diff) | |
download | nextcloud-server-c50fe2a9c9786247ef31aad855813b377ed33e89.tar.gz nextcloud-server-c50fe2a9c9786247ef31aad855813b377ed33e89.zip |
Send emails when remote wipe starts/finishes
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/Application.php')
-rw-r--r-- | core/Application.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/core/Application.php b/core/Application.php index 97ebae774dd..9655a8e1a47 100644 --- a/core/Application.php +++ b/core/Application.php @@ -31,6 +31,7 @@ namespace OC\Core; use OC\Authentication\Events\RemoteWipeFinished; use OC\Authentication\Events\RemoteWipeStarted; use OC\Authentication\Listeners\RemoteWipeActivityListener; +use OC\Authentication\Listeners\RemoteWipeEmailListener; use OC\Authentication\Listeners\RemoteWipeNotificationsListener; use OC\Authentication\Notifications\Notifier as AuthenticationNotifier; use OC\Core\Notification\RemoveLinkSharesNotifier; @@ -64,19 +65,19 @@ class Application extends App { $eventDispatcher = $server->query(IEventDispatcher::class); $notificationManager = $server->getNotificationManager(); - $notificationManager->registerNotifier(function() use ($server) { + $notificationManager->registerNotifier(function () use ($server) { return new RemoveLinkSharesNotifier( $server->getL10NFactory() ); - }, function() { + }, function () { return [ 'id' => 'core', 'name' => 'core', ]; }); - $notificationManager->registerNotifier(function() use ($server) { + $notificationManager->registerNotifier(function () use ($server) { return $server->query(AuthenticationNotifier::class); - }, function() { + }, function () { return [ 'id' => 'auth', 'name' => 'authentication notifier', @@ -84,7 +85,7 @@ class Application extends App { }); $eventDispatcher->addListener(IDBConnection::CHECK_MISSING_INDEXES_EVENT, - function(GenericEvent $event) use ($container) { + function (GenericEvent $event) use ($container) { /** @var MissingIndexInformation $subject */ $subject = $event->getSubject(); @@ -165,7 +166,10 @@ class Application extends App { $eventDispatcher->addServiceListener(RemoteWipeStarted::class, RemoteWipeActivityListener::class); $eventDispatcher->addServiceListener(RemoteWipeStarted::class, RemoteWipeNotificationsListener::class); + $eventDispatcher->addServiceListener(RemoteWipeStarted::class, RemoteWipeEmailListener::class); $eventDispatcher->addServiceListener(RemoteWipeFinished::class, RemoteWipeActivityListener::class); $eventDispatcher->addServiceListener(RemoteWipeFinished::class, RemoteWipeNotificationsListener::class); + $eventDispatcher->addServiceListener(RemoteWipeFinished::class, RemoteWipeEmailListener::class); } + } |