MediaWiki REL1_40
|
Helper functions for the login form that need to be shared with other special pages (such as CentralAuth's SpecialCentralLogin). More...
Inherits ContextSource.
Public Member Functions | |
__construct (IContextSource $context) | |
showReturnToPage ( $type, $returnTo='', $returnToQuery='', $stickHTTPS=false, $returnToAnchor='') | |
Show a return link or redirect to it. | |
Public Member Functions inherited from ContextSource | |
canUseWikiPage () | |
Check whether a WikiPage object can be get with getWikiPage(). | |
exportSession () | |
Export the resolved user IP, HTTP headers, user ID, and session ID. | |
getActionName () | |
Get the action name for the current web request. | |
getAuthority () | |
getConfig () | |
getContext () | |
Get the base IContextSource object. | |
getCsrfTokenSet () | |
Get a repository to obtain and match CSRF tokens. | |
getLanguage () | |
getOutput () | |
getRequest () | |
getSkin () | |
getTiming () | |
getTitle () | |
getUser () | |
getWikiPage () | |
Get the WikiPage object. | |
msg ( $key,... $params) | |
Get a Message object with context set Parameters are the same as wfMessage() | |
setContext (IContextSource $context) | |
Static Public Member Functions | |
static | getValidErrorMessages () |
Returns an array of all valid error messages. | |
Static Public Attributes | |
static string[] | $validErrorMessages |
Valid error and warning messages. | |
Helper functions for the login form that need to be shared with other special pages (such as CentralAuth's SpecialCentralLogin).
Definition at line 12 of file LoginHelper.php.
LoginHelper::__construct | ( | IContextSource | $context | ) |
Definition at line 53 of file LoginHelper.php.
References ContextSource\setContext().
|
static |
Returns an array of all valid error messages.
Definition at line 43 of file LoginHelper.php.
References $validErrorMessages.
Referenced by LoginSignupSpecialPage\load(), and UserNotLoggedIn\report().
LoginHelper::showReturnToPage | ( | $type, | |
$returnTo = '', | |||
$returnToQuery = '', | |||
$stickHTTPS = false, | |||
$returnToAnchor = '' ) |
Show a return link or redirect to it.
Extensions can change where the link should point or inject content into the page (which will change it from redirect to link mode).
string | $type | One of the following:
|
string | $returnTo | Title of page to return to. Overriden by $wgRedirectOnLogin when that is set (and $type is not 'error'). |
array | string | $returnToQuery | Query parameters to return to. |
bool | $stickHTTPS | Keep redirect link on HTTPS. Ignored (treated as true) if $wgForceHTTPS is true. |
string | $returnToAnchor | A string to append to the URL, presumed to be either a fragment including the leading hash or an empty string. |
Definition at line 75 of file LoginHelper.php.
References $type, ContextSource\getConfig(), ContextSource\getOutput(), PROTO_HTTP, PROTO_HTTPS, PROTO_RELATIVE, and wfCgiToArray().
|
static |
Valid error and warning messages.
Special:Userlogin can show an error or warning message on the form when coming from another page. This is done via the ?error= or ?warning= GET parameters.
This array is the list of valid message keys. Further keys can be added by the LoginFormValidErrorMessages hook. All other values will be ignored.
Definition at line 27 of file LoginHelper.php.
Referenced by getValidErrorMessages().