MediaWiki REL1_40
MediaWiki\User\Hook\UserSendConfirmationMailHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onUserSendConfirmationMail ( $user, &$mail, $info)
 This hook is called just before a confirmation email is sent to a user.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "UserSendConfirmationMail" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 14 of file UserSendConfirmationMailHook.php.

Member Function Documentation

◆ onUserSendConfirmationMail()

MediaWiki\User\Hook\UserSendConfirmationMailHook::onUserSendConfirmationMail ( $user,
& $mail,
$info )

This hook is called just before a confirmation email is sent to a user.

Hook handlers can modify the email that will be sent.

Since
1.35
Parameters
User$userThe User for which the confirmation email is going to be sent
array&$mailAssociative array describing the email, with the following keys:
  • subject: Subject line of the email
  • body: Email body. Can be a string, or an array with keys 'text' and 'html'
  • from: User object, or null meaning $wgPasswordSender will be used
  • replyTo: MailAddress object or null
array$infoAssociative array with additional information:
  • type: 'created' if the user's account was just created; 'set' if the user set an email address when they previously didn't have one; 'changed' if the user had an email address and changed it
  • ip: The IP address from which the user set/changed their email address
  • confirmURL: URL the user should visit to confirm their email
  • invalidateURL: URL the user should visit to invalidate confirmURL
  • expiration: time and date when confirmURL expires
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: