* (bug 7054) Validate email address before sending email confirmation message
authorRob Church <robchurch@users.mediawiki.org>
Fri, 18 Aug 2006 15:28:13 +0000 (15:28 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Fri, 18 Aug 2006 15:28:13 +0000 (15:28 +0000)
RELEASE-NOTES
includes/SpecialConfirmemail.php
languages/MessagesEn.php

index 1afb341..91a5fc6 100644 (file)
@@ -142,7 +142,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Added {{CURRENTHOUR}}
 * Added [[:Image:Foo.png]] style links to the pagelinks table
 * Avoid duplicate revision imports with Special:Import
-
+* (bug 7054) Validate email address before sending email confirmation message
 
 == Languages updated ==
 
index fd0425a..7256760 100644 (file)
@@ -30,7 +30,11 @@ class EmailConfirmation extends SpecialPage {
                global $wgUser, $wgOut;
                if( empty( $code ) ) {
                        if( $wgUser->isLoggedIn() ) {
-                               $this->showRequestForm();
+                               if( User::isValidEmailAddr( $wgUser->getEmail() ) ) {
+                                       $this->showRequestForm();
+                               } else {
+                                       $wgOut->addWikiText( wfMsg( 'confirmemail_noemail' ) );
+                               }
                        } else {
                                $title = Title::makeTitle( NS_SPECIAL, 'Userlogin' );
                                $self = Title::makeTitle( NS_SPECIAL, 'Confirmemail' );
index 6416d8a..5659177 100644 (file)
@@ -2275,6 +2275,7 @@ is collapsed. Others will be hidden by default.
 
 # E-mail address confirmation
 'confirmemail' => 'Confirm E-mail address',
+'confirmemail_noemail' => 'You do not have a valid email address set in your [[Special:Preferences|user preferences]].',
 'confirmemail_text' => "This wiki requires that you validate your e-mail address
 before using e-mail features. Activate the button below to send a confirmation
 mail to your address. The mail will include a link containing a code; load the