Manual:Hooks/LoginPasswordResetMessage

From mediawiki.org
LoginPasswordResetMessage
Available from version 1.23.0 (Gerrit change 92037)
Removed in version 1.27.0
called when the user is being requested to reset their password on login.
Define function:
public static function onLoginPasswordResetMessage( Message &$msg, $username ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"LoginPasswordResetMessage": "MediaWiki\\Extension\\MyExtension\\Hooks::onLoginPasswordResetMessage"
	}
}
Called from: File(s): specials/SpecialUserLogin.php
Function(s): LoginForm
Interface: LoginPasswordResetMessageHook.php

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


Details[edit]

Use this hook to change the Message that will be output on Special:ChangePassword. &$msg: Message object that will be shown to the user $username: Username of the user who's password was expired.