Jump to content

Manual:Hooks/UserSetEmail

From mediawiki.org
UserSetEmail
Available from version 1.13.0
Called when changing user email address.
Define function:
public static function onUserSetEmail( User $user, &$email ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"UserSetEmail": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserSetEmail"
	}
}
Called from: File(s): User.php
Interface: UserSetEmailHook.php

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

Details

[edit]
  • $user: User object
  • &$email: new email, change this to override new email address

See also

[edit]