Manual:Hooks/UserGetEmail

UserGetEmail
Available from version 1.13.0
Called when getting an user email address.
Define function:
public static function onUserGetEmail( $user, &$email ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"UserGetEmail": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserGetEmail"
	}
}
Called from: File(s): User.php
Interface: UserGetEmailHook.php

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

Details

edit
  • $user: User object
  • &$email: email, change this to override local email

See also

edit