Manual:Hooks/PrefsPasswordAudit
This feature was removed from MediaWiki core in version 1.27.0. Please see ChangeAuthenticationDataAudit for an alternative way to use this feature. |
PrefsPasswordAudit | |
---|---|
Available from version 1.11.0 Removed in version 1.27.0 called when user changes his password | |
Define function: | public static function onPrefsPasswordAudit( User $user, $newPass, $error ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"PrefsPasswordAudit": "MediaWiki\\Extension\\MyExtension\\Hooks::onPrefsPasswordAudit"
}
}
|
Called from: | File(s): SpecialPreferences.php, SpecialResetpass.php |
Interface: | PrefsPasswordAuditHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:PrefsPasswordAudit extensions.
Called from SpecialPreferences.php in versions 1.11.0 - 1.13. Called from SpecialResetpass.php from 1.14 onward
Details
edit$user
: User (object) changing their password$newPass
: new password$error
: error (string) 'badretype', 'wrongpassword', 'error' or 'success'