Manual:Hooks/AbortChangePassword

From mediawiki.org
Jump to navigation Jump to search
AbortChangePassword
Available from version 1.19.5 (Gerrit change 61631)
Removed in version 1.27.0
Return false to cancel password change.
Define function:
public static function onAbortChangePassword( User $user, $oldPassword, $newPassword, &$abortMsg ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"AbortChangePassword": "MyExtensionHooks::onAbortChangePassword"
	}
}
Called from: File(s): specials/SpecialChangePassword.php
Function(s): attemptReset
Interface: AbortChangePasswordHook.php

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


Details[edit]

  • $user: the User object to which the password change is occurring
  • $oldPassword: the old password provided by the user
  • $newPassword: the new password provided by the user
  • &$abortMsg: the message identifier for abort reason