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": "MyExtensionHooks::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.

DetailsEdit

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

See alsoEdit