Update documentation for EmailUser hooks
Document the missing $error parameter of the EmailUser hook.
Clarify the type of the address parameter
Also add an comment, why a variable is used twice
Follows 38c7c8f895 (r64903)
Change-Id: I1c5636dc378667ef2798c69659b43f70734f4144
This commit is contained in:
parent
ddff77af20
commit
20318ecd87
2 changed files with 10 additions and 6 deletions
|
|
@ -1271,20 +1271,21 @@ $user: User being checked
|
|||
$confirmed: Whether or not the email address is confirmed
|
||||
|
||||
'EmailUser': Before sending email from one user to another.
|
||||
$to: address of receiving user
|
||||
$from: address of sending user
|
||||
$to: MailAddress object of receiving user
|
||||
$from: MailAddress object of sending user
|
||||
$subject: subject of the mail
|
||||
$text: text of the mail
|
||||
&$error: Out-param for an error
|
||||
|
||||
'EmailUserCC': Before sending the copy of the email to the author.
|
||||
$to: address of receiving user
|
||||
$from: address of sending user
|
||||
$to: MailAddress object of receiving user
|
||||
$from: MailAddress object of sending user
|
||||
$subject: subject of the mail
|
||||
$text: text of the mail
|
||||
|
||||
'EmailUserComplete': After sending email from one user to another.
|
||||
$to: address of receiving user
|
||||
$from: address of sending user
|
||||
$to: MailAddress object of receiving user
|
||||
$from: MailAddress object of sending user
|
||||
$subject: subject of the mail
|
||||
$text: text of the mail
|
||||
|
||||
|
|
|
|||
|
|
@ -369,7 +369,10 @@ class SpecialEmailUser extends UnlistedSpecialPage {
|
|||
if ( $data['CCMe'] && $to != $from ) {
|
||||
$cc_subject = $context->msg( 'emailccsubject' )->rawParams(
|
||||
$target->getName(), $subject )->text();
|
||||
|
||||
// target and sender are equal, because this is the CC for the sender
|
||||
Hooks::run( 'EmailUserCC', array( &$from, &$from, &$cc_subject, &$text ) );
|
||||
|
||||
$ccStatus = UserMailer::send( $from, $from, $cc_subject, $text );
|
||||
$status->merge( $ccStatus );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue