From f8625ed29d5263beae54e3cd49f595229ff009d7 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 6 Aug 2008 23:43:17 +0000 Subject: [PATCH] * (bug 15055) Talk page notifications no longer attempt to send mail when user's e-mail address is invalid or unconfirmed --- RELEASE-NOTES | 3 ++- includes/UserMailer.php | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9bb680c7ad..b6e5619e5f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -66,7 +66,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 15049) Fix for CheckUser extension's log search: usernames containing a "-" were incorrectly turned into bogus IP range searches. Patch by Max Semenik. - +* (bug 15055) Talk page notifications no longer attempt to send mail when + user's e-mail address is invalid or unconfirmed === API changes in 1.14 === diff --git a/includes/UserMailer.php b/includes/UserMailer.php index 0bc4268ff9..ad550dc3b4 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -347,9 +347,13 @@ class EmailNotification { } elseif ( $targetUser->getId() == $editor->getId() ) { wfDebug( __METHOD__.": user edited their own talk page, no notification sent\n" ); } elseif( $targetUser->getOption( 'enotifusertalkpages' ) ) { - wfDebug( __METHOD__.": sending talk page update notification\n" ); - $this->compose( $targetUser ); - $userTalkId = $targetUser->getId(); + if( $targetUser->isEmailConfirmed() ) { + wfDebug( __METHOD__.": sending talk page update notification\n" ); + $this->compose( $targetUser ); + $userTalkId = $targetUser->getId(); + } else { + wfDebug( __METHOD__.": talk page owner doesn't have validated email\n" ); + } } else { wfDebug( __METHOD__.": talk page owner doesn't want notifications\n" ); } -- 2.20.1