< Manual:Hooks
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": "MyExtensionHooks::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

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

See also

  • PrefsEmailAudit
  • UserGetEmail
  • UserSetEmailAuthenticationTimestamp
  • ConfirmEmailComplete
  • InvalidateEmailComplete
  • isValidEmailAddr
  • AuthManager::allowsPropertyChange( 'emailaddress' ) and PrimaryAuthenticationProvider::providerAllowsPropertyChange( 'emailaddress' )
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.