* (bug 15055) Talk page notifications no longer attempt to send mail when
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 6 Aug 2008 23:43:17 +0000 (23:43 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 6 Aug 2008 23:43:17 +0000 (23:43 +0000)
  user's e-mail address is invalid or unconfirmed

RELEASE-NOTES
includes/UserMailer.php

index 9bb680c..b6e5619 100644 (file)
@@ -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 ===
 
index 0bc4268..ad550dc 100644 (file)
@@ -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" );
                                }