Jump to navigation Jump to search
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": "MyExtensionHooks::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


  • $user: User (object) changing their password
  • $newPass: new password
  • $error: error (string) 'badretype', 'wrongpassword', 'error' or 'success'