MediaWiki master
LoginErrorHelper.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Exception;
4
7
13
17 private static $validErrorMessages = [
18 'exception-nologin-text',
19 'exception-nologin-text-for-temp-user',
20 'watchlistanontext',
21 'watchlistanontext-for-temp-user',
22 'watchlistlabels-not-logged-in',
23 'watchlistlabels-not-logged-in-for-temp-user',
24 'changeemail-no-info',
25 'confirmemail_needlogin',
26 'prefsnologintext2',
27 'prefsnologintext2-for-temp-user',
28 'specialmute-login-required',
29 'specialmute-login-required-for-temp-user',
30 'mailnologintext',
31 ];
32
34 private static ?array $validErrorMessagesCache = null;
35
49 public static function getValidErrorMessages(): array {
50 if ( !static::$validErrorMessagesCache ) {
51 static::$validErrorMessagesCache = self::$validErrorMessages;
52 ( new HookRunner( MediaWikiServices::getInstance()->getHookContainer() ) )
53 ->onLoginFormValidErrorMessages( static::$validErrorMessagesCache );
54 }
55
56 return static::$validErrorMessagesCache;
57 }
58}
if(!defined('MW_SETUP_CALLBACK'))
Definition WebStart.php:71
Helper functions for the login errors.
static getValidErrorMessages()
Returns an array of all error and warning messages that can be displayed on Special:UserLogin or Spec...
This class provides an implementation of the core hook interfaces, forwarding hook calls to HookConta...
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.