summaryrefslogtreecommitdiffstats
path: root/lib/private/Authentication
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-04-30 12:08:22 +0200
committerJoas Schilling <coding@schilljs.com>2019-07-15 15:14:58 +0200
commit64f67818bcc6cc61cc49b1a7c032f3db85b73c91 (patch)
treef17e3c44ce81a94e4cf9d0f941a0002011b4f1a3 /lib/private/Authentication
parent865c12aa0e624d21d15b351ee5fcbedffa55f11c (diff)
downloadnextcloud-server-64f67818bcc6cc61cc49b1a7c032f3db85b73c91.tar.gz
nextcloud-server-64f67818bcc6cc61cc49b1a7c032f3db85b73c91.zip
Fix new core notifier
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Authentication')
-rw-r--r--lib/private/Authentication/Notifications/Notifier.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/private/Authentication/Notifications/Notifier.php b/lib/private/Authentication/Notifications/Notifier.php
index 0aafc115b22..f76bb077a3c 100644
--- a/lib/private/Authentication/Notifications/Notifier.php
+++ b/lib/private/Authentication/Notifications/Notifier.php
@@ -42,7 +42,7 @@ class Notifier implements INotifier {
/**
* @inheritDoc
*/
- public function prepare(INotification $notification, $languageCode) {
+ public function prepare(INotification $notification, string $languageCode): INotification {
if ($notification->getApp() !== 'auth') {
// Not my app => throw
throw new InvalidArgumentException();
@@ -74,4 +74,23 @@ class Notifier implements INotifier {
}
}
+ /**
+ * Identifier of the notifier, only use [a-z0-9_]
+ *
+ * @return string
+ * @since 17.0.0
+ */
+ public function getID(): string {
+ return 'auth';
+ }
+
+ /**
+ * Human readable name describing the notifier
+ *
+ * @return string
+ * @since 17.0.0
+ */
+ public function getName(): string {
+ return $this->factory->get('lib')->t('Authentication');
+ }
}