function execute( $code ) {
// Ignore things like master queries/connections on GET requests.
// It's very convenient to just allow formless link usage.
- Profiler::instance()->getTransactionProfiler()->resetExpectations();
+ $trxProfiler = Profiler::instance()->getTransactionProfiler();
$this->setHeaders();
-
$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' ) ) {
}
if ( $code === null || $code === '' ) {
+ $this->requireLogin( 'confirmemail_needlogin' );
if ( Sanitizer::validateEmail( $this->getUser()->getEmail() ) ) {
$this->showRequestForm();
} else {
$this->getOutput()->addWikiMsg( 'confirmemail_noemail' );
}
} else {
+ $old = $trxProfiler->setSilenced( true );
$this->attemptConfirm( $code );
+ $trxProfiler->setSilenced( $old );
}
}
*
* @param string $code Confirmation code
*/
- function attemptConfirm( $code ) {
+ private function attemptConfirm( $code ) {
$user = User::newFromConfirmationCode( $code, User::READ_LATEST );
if ( !is_object( $user ) ) {
$this->getOutput()->addWikiMsg( 'confirmemail_invalid' );