Manual:Hooks/AbortLogin
From MediaWiki.org
| AbortLogin | |
|---|---|
| Available from version 1.10.0 Can cancel the login process |
|
Define function: |
public static function onAbortLogin( $user, $password, &$retval ) { ... }
|
Attach hook: |
$wgHooks['AbortLogin'][] = 'MyExtensionHooks::onAbortLogin'; |
| Called from: | SpecialUserlogin.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:AbortLogin extensions.
Details [edit]
- $user: User object being authenticated against
- $password: password being submitted (before validity checks)
- &$retval: a LoginForm class constant to return from authenticateUserData (default is LoginForm::ABORTED)
Notes [edit]
- Can be used to allow an extension (for example, a captcha) to abort the login process
- For &$retval, note that client may be using a machine API rather than the HTML user interface.
