Manual:Hooks/LoginAuthenticateAudit

From MediaWiki.org
Jump to: navigation, search
LoginAuthenticateAudit
Available from version 1.10.0
A login attempt for a valid user account either succeeded or failed. No return data is accepted; this hook is for auditing only.

Define function:
public static function onLoginAuthenticateAudit( $user, $password, $retval ) { ... }

Attach hook:
$wgHooks['LoginAuthenticateAudit'][] = 'MyExtensionHooks::onLoginAuthenticateAudit';
Called from: SpecialUserlogin.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:LoginAuthenticateAudit extensions.


Details [edit]

$user - The User object being authenticated against.
$password - The password being submitted and found wanting.
$retval - A LoginForm class constant with authenticateUserData() return value (SUCCESS, WRONG_PASS, etc).