Manual:Hooks/User::mailPasswordInternal

User::mailPasswordInternal
Available from version 1.14.0
Before creation and mailing of a user's new temporary password.
Define function:
public static function onUser_mailPasswordInternal( $user, $ip, $u ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"User::mailPasswordInternal": "MyExtensionHooks::onUsermailPasswordInternal"
	}
}

For MediaWiki ≤1.25:

$wgHooks['User::mailPasswordInternal'][] = 'MyExtensionHooks::onUsermailPasswordInternal';
Called from:File(s): specials/SpecialUserLogin.php

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

DetailsEdit

  • $user: the user who sent the message out
  • $ip: IP of the user who sent the message out
  • $u: the account whose new password will be set