From: Rob Church Date: Fri, 18 Aug 2006 15:28:13 +0000 (+0000) Subject: * (bug 7054) Validate email address before sending email confirmation message X-Git-Tag: 1.31.0-rc.0~55956 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/Bar?a=commitdiff_plain;h=091e5d24b1b712f21befa00e2a3c37303931d738;p=lhc%2Fweb%2Fwiklou.git * (bug 7054) Validate email address before sending email confirmation message --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1afb3411de..91a5fc60c4 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/SpecialConfirmemail.php b/includes/SpecialConfirmemail.php index fd0425a871..725676099b 100644 --- a/includes/SpecialConfirmemail.php +++ b/includes/SpecialConfirmemail.php @@ -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' ); diff --git a/languages/MessagesEn.php b/languages/MessagesEn.php index 6416d8a410..56591779c6 100644 --- a/languages/MessagesEn.php +++ b/languages/MessagesEn.php @@ -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