Do not require login on Special:Confirmemail to confirm the email
authorRohan <rohan1395@yahoo.com>
Fri, 11 Jul 2014 05:50:32 +0000 (11:20 +0530)
committerSmriti Singh <smritis.31095@gmail.com>
Tue, 5 Apr 2016 14:33:26 +0000 (20:03 +0530)
The user doesn't need to be logged in to confirm his/her email.

Particle revert of I43ceaddb370d09784021b3fc2d5d1ff6616fef1f

Bug: T62434
Change-Id: Idf3f9827daaac87f5c57617f4e5d42ca9569839d

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 {