'LoginNotify/UserAvatar.svg' ]; $notificationCategories['login-fail'] = [ 'priority' => 7, 'tooltip' => 'echo-pref-tooltip-login-fail', ]; $loginBase = [ AttributeManager::ATTR_LOCATORS => [ [ [ UserLocator::class, 'locateEventAgent' ] ], ], 'canNotifyAgent' => true, 'category' => 'login-fail', 'group' => 'negative', 'presentation-model' => PresentationModel::class, 'icon' => 'LoginNotify-user-avatar', 'immediate' => true, ]; $notifications['login-fail-new'] = [ 'bundle' => [ 'web' => true, 'expandable' => false ] ] + $loginBase; $notifications['login-fail-known'] = [ 'bundle' => [ 'web' => true, 'expandable' => false ] ] + $loginBase; if ( $wgLoginNotifyEnableOnSuccess ) { $notificationCategories['login-success'] = [ 'priority' => 7, 'tooltip' => 'echo-pref-tooltip-login-success', ]; $notifications['login-success'] = [ 'category' => 'login-success', ] + $loginBase; $wgNotifyTypeAvailabilityByCategory['login-success'] = [ 'web' => false, 'email' => true, ]; } } /** * @param Event $event * @param string &$bundleString */ public function onEchoGetBundleRules( Event $event, string &$bundleString ) { switch ( $event->getType() ) { case 'login-fail-new': $bundleString = 'login-fail'; break; } } }