MediaWiki master
MediaWiki\Mail\NotificationEmail\NotificationEmailSender Class Reference

Sends notification emails to the old address when a user changes or removes their email. More...

Public Member Functions

 __construct (private readonly ServiceOptions $options, private readonly IEmailer $emailer, private readonly BagOStuff $cache, private readonly UrlUtils $urlUtils)
 
 sendNotificationMail (IContextSource $ctx, User $recipientUser, string $change, string $newEmail='')
 Email the old address notifying about the email change.
 

Public Attributes

const array CONSTRUCTOR_OPTIONS
 

Detailed Description

Sends notification emails to the old address when a user changes or removes their email.

Used when the user previously had a confirmed email and is now changing it. The notification is sent to the old address to alert the user.

Definition at line 21 of file NotificationEmailSender.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Mail\NotificationEmail\NotificationEmailSender::__construct ( private readonly ServiceOptions $options,
private readonly IEmailer $emailer,
private readonly BagOStuff $cache,
private readonly UrlUtils $urlUtils )

Definition at line 28 of file NotificationEmailSender.php.

Member Function Documentation

◆ sendNotificationMail()

MediaWiki\Mail\NotificationEmail\NotificationEmailSender::sendNotificationMail ( IContextSource $ctx,
User $recipientUser,
string $change,
string $newEmail = '' )

Email the old address notifying about the email change.

Parameters
IContextSource$ctxRequest context (for IP, messages, etc.)
User$recipientUserThe user whose email is being changed (recipient = their old address)
string$changeEither 'changed' or 'removed'
string$newEmailThe new email address (only used when $change === 'changed')
Returns
StatusValue

Definition at line 46 of file NotificationEmailSender.php.

References MediaWiki\User\User\getName().

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

const array MediaWiki\Mail\NotificationEmail\NotificationEmailSender::CONSTRUCTOR_OPTIONS
Initial value:
= [
]
const AllowHTMLEmail
Name constant for the AllowHTMLEmail setting, for use with Config::get()
const PasswordSender
Name constant for the PasswordSender setting, for use with Config::get()

Definition at line 23 of file NotificationEmailSender.php.


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