summaryrefslogtreecommitdiff
path: root/includes/SpecialConfirmemail.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/SpecialConfirmemail.php')
-rw-r--r--includes/SpecialConfirmemail.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/SpecialConfirmemail.php b/includes/SpecialConfirmemail.php
index fd0425a8..72567609 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' );