Manual:Hooks/User::mailPasswordInternal

From MediaWiki.org
Jump to navigation Jump to search
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 $performingUser, string $ip, \User $user ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"User::mailPasswordInternal": "MyExtensionHooks::onUsermailPasswordInternal"
	}
}
Called from:File(s): includes/user/PasswordReset.php, includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php
Interface:User____mailPasswordInternalHook.php

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

Details[edit]

  • \User $performingUser: the user who sent the message out
  • string $ip: IP of the user who sent the message out
  • \User $user: the account whose new password will be set