Merge "Balancer: Introduce BalanceElement::isHtmlNamed()"
[lhc/web/wiklou.git] / includes / specials / SpecialConfirmemail.php
index 914781c..a656c2e 100644 (file)
@@ -56,8 +56,6 @@ class EmailConfirmation extends UnlistedSpecialPage {
                $this->checkReadOnly();
                $this->checkPermissions();
 
-               $this->requireLogin( 'confirmemail_needlogin' );
-
                // This could also let someone check the current email address, so
                // require both permissions.
                if ( !$this->getUser()->isAllowed( 'viewmyprivateinfo' ) ) {
@@ -65,6 +63,7 @@ class EmailConfirmation extends UnlistedSpecialPage {
                }
 
                if ( $code === null || $code === '' ) {
+                       $this->requireLogin( 'confirmemail_needlogin' );
                        if ( Sanitizer::validateEmail( $this->getUser()->getEmail() ) ) {
                                $this->showRequestForm();
                        } else {