Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-04-16 13:39:08 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2021-04-16 14:56:28 +0300
commit0593b039fc3387e76aa9798bcbf93bda8466667b (patch)
treea7ffc867435e8d905494aa6c1c3e0a403521a013 /apps/twofactor_backupcodes
parentfc1161722282ecc2d3a40627042b3dac418126cd (diff)
Move over notification to new registration
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/twofactor_backupcodes')
-rw-r--r--apps/twofactor_backupcodes/lib/AppInfo/Application.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/twofactor_backupcodes/lib/AppInfo/Application.php b/apps/twofactor_backupcodes/lib/AppInfo/Application.php
index 4ac5016f925..67c09019d04 100644
--- a/apps/twofactor_backupcodes/lib/AppInfo/Application.php
+++ b/apps/twofactor_backupcodes/lib/AppInfo/Application.php
@@ -28,7 +28,6 @@ declare(strict_types=1);
namespace OCA\TwoFactorBackupCodes\AppInfo;
-use Closure;
use OCA\TwoFactorBackupCodes\Db\BackupCodeMapper;
use OCA\TwoFactorBackupCodes\Event\CodesGenerated;
use OCA\TwoFactorBackupCodes\Listener\ActivityPublisher;
@@ -42,7 +41,6 @@ use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\Authentication\TwoFactorAuth\IRegistry;
-use OCP\Notification\IManager;
use OCP\Util;
class Application extends App implements IBootstrap {
@@ -54,12 +52,12 @@ class Application extends App implements IBootstrap {
public function register(IRegistrationContext $context): void {
$this->registerHooksAndEvents($context);
+
+ $context->registerNotifierService(Notifier::class);
}
public function boot(IBootContext $context): void {
Util::connectHook('OC_User', 'post_deleteUser', $this, 'deleteUser');
-
- $context->injectFn(Closure::fromCallable([$this, 'registerNotification']));
}
/**
@@ -73,10 +71,6 @@ class Application extends App implements IBootstrap {
$context->registerEventListener(IRegistry::EVENT_PROVIDER_DISABLED, ProviderDisabled::class);
}
- private function registerNotification(IManager $manager) {
- $manager->registerNotifierService(Notifier::class);
- }
-
public function deleteUser($params) {
/** @var BackupCodeMapper $mapper */
$mapper = $this->getContainer()->query(BackupCodeMapper::class);