From d196cbf94e88bca75c5bc5b2b20b9c89b5ca184f Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sun, 21 Sep 2014 18:25:14 -0700 Subject: [PATCH] Use MailAddress::newFromUser() Change-Id: I7c6ce9aade27dae66732274979d8baa9eeb0b17c --- Notifier.php | 2 +- includes/EmailBatch.php | 2 +- includes/EmailBundler.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Notifier.php b/Notifier.php index 702d92390..53c6e747c 100644 --- a/Notifier.php +++ b/Notifier.php @@ -86,7 +86,7 @@ class EchoNotifier { // send single notification if the email wasn't added to queue for bundling if ( !$addedToQueue ) { // instant email notification - $toAddress = new MailAddress( $user ); + $toAddress = MailAddress::newFromUser( $user ); $fromAddress = new MailAddress( $wgNotificationSender, EchoHooks::getNotificationSenderName() ); $replyAddress = new MailAddress( $wgNotificationSender, $wgNotificationReplyName ); // Since we are sending a single email, should set the bundle hash to null diff --git a/includes/EmailBatch.php b/includes/EmailBatch.php index 6b5bbb1ff..854e0d3b6 100644 --- a/includes/EmailBatch.php +++ b/includes/EmailBatch.php @@ -217,7 +217,7 @@ abstract class MWEchoEmailBatch { ->inLanguage( $this->mUser->getOption( 'language' ) ) ->params( $count, $this->count )->text(); - $toAddress = new MailAddress( $this->mUser ); + $toAddress = MailAddress::newFromUser( $this->mUser ); $fromAddress = new MailAddress( $wgNotificationSender, EchoHooks::getNotificationSenderName() ); $replyAddress = new MailAddress( $wgNotificationSender, $wgNotificationReplyName ); diff --git a/includes/EmailBundler.php b/includes/EmailBundler.php index da9f03480..ba01ad111 100644 --- a/includes/EmailBundler.php +++ b/includes/EmailBundler.php @@ -243,7 +243,7 @@ abstract class MWEchoEmailBundler { global $wgNotificationSender, $wgNotificationReplyName; - $toAddress = new MailAddress( $this->mUser ); + $toAddress = MailAddress::newFromUser( $this->mUser ); $fromAddress = new MailAddress( $wgNotificationSender, EchoHooks::getNotificationSenderName() ); $replyAddress = new MailAddress( $wgNotificationSender, $wgNotificationReplyName );