Show an email verification page.

@return ResponseInterface
771509
public function verifyPage(): ResponseInterface
    {
        $this->checkRegistrationAllowed();

        $title = I18N::translate('User verification');

        return $this->viewResponse('register-page', [
            'title' => $title,
        ]);
    }
2241
public function signup() : Response
    {
        $user = $this->userModel;

        $request = $this->request->getPost();

        if (empty($request)) {
            $request = $this->request->getJsonRawBody(true);
        }

        $user->email = $this->request->getPost('email', 'email');
        $user->firstname = ltrim(trim($this->request->getPost('firstname', 'string')));
        $user->lastname = ltrim(trim($this->request->getPost('lastname', 'string')));
        $user->password = ltrim(trim($this->request->getPost('password', 'string')));
        $userIp = !defined('API_TESTS') ? $this->request->getClientAddress() : '127.0.0.1'; //help getting the client ip on scrutinizer :(
        $user->displayname = ltrim(trim($this->request->getPost('displayname', 'string')));
        $user->defaultCompanyName = ltrim(trim($this->request->getPost('default_company', 'string')));

        //Ok let validate user password
        $validation = new Validation();
        $validation->add('password', new PresenceOf(['message' => _('The password is required.')]));
        $validation->add('firstname', new PresenceOf(['message' => _('The firstname is required.')]));
        $validation->add('email', new EmailValidator(['message' => _('The email is not valid.')]));

        $validation->add(
            'password',
            new StringLength([
                'min' => 8,
                'messageMinimum' => _('Password is too short. Minimum 8 characters.'),
            ])
        );

        $validation->add('password', new Confirmation([
            'message' => _('Password and confirmation do not match.'),
            'with' => 'verify_password',
        ]));

        //validate this form for password
        $messages = $validation->validate($this->request->getPost());
        if (count($messages)) {
            foreach ($messages as $message) {
                throw new Exception($message);
            }
        }

        //user registration
        try {
            $this->db->begin();

            $user->signup();

            $this->db->commit();
        } catch (Exception $e) {
            $this->db->rollback();

            throw new Exception($e->getMessage());
        }

        //login the user
        $random = new \Phalcon\Security\Random();

        $sessionId = $random->uuid();

        //save in user logs
        $payload = [
            'sessionId' => $sessionId,
            'email' => $user->getEmail(),
            'iat' => time(),
        ];

        $token = $this->auth->make($payload);

        //start session
        $session = new Sessions();
        $session->start($user, $sessionId, $token, $userIp, 1);

        $authSession = [
            'token' => $token,
            'time' => date('Y-m-d H:i:s'),
            'expires' => date('Y-m-d H:i:s', time() + $this->config->jwt->payload->exp),
            'id' => $user->getId(),
        ];

        $user->password = null;
        $this->sendEmail($user, 'signup');

        return $this->response([
            'user' => $user,
            'session' => $authSession
        ]);
    }
279767
public function listVerifiedEmailAddresses() {
        $response = $this->_makeRequest(array(
            'Action' => 'ListVerifiedEmailAddresses'
        ));
        $dom = new DOMDocument();
        $dom->loadXML($response);
        $members = $dom->getElementsByTagName('member');
        $out = array();
        foreach ($members as $member) {
            $out[] = $member->nodeValue;
        }
        return $out;
    }
580781
protected function askEmail()
    {
        $email = $this->ask('E-mail');

        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            $this->error("'$email' is not an email address.");
            exit(2);
        } elseif (UserProxy::where('email', $email)->first()) {
            $this->error("User '$email' already exists");
            exit(3);
        }

        return $email;
    }
809616
public function bingVerifAction()
    {
        if ( !$this->getConfigResolver()->hasParameter( 'bing_verification', 'nova_ezseo' ) )
        {
            throw new NotFoundHttpException( "Bing Verification Key not found" );
        }

        $key = $this->getConfigResolver()->getParameter( 'bing_verification', 'nova_ezseo' );

        $xml = new DOMDocument("1.0", "UTF-8");
        $xml->formatOutput = true;

        $root = $xml->createElement("users");
        $root->appendChild($xml->createElement("user", $key));
        $xml->appendChild($root);

        $response = new Response($xml->saveXML());
        $response->setSharedMaxAge( 24 * 3600 );
        $response->headers->set("Content-Type", "text/xml");
        return $response;
    }
1183988
public function verify($emailAddress)
    {
        $this->response = $this->client->quickemailverification()->verify($emailAddress);

        return $this;
    }
187784
private function getUpdatedEntityResponse()
    {
        $response = $this->getEditionResponse();
        try {
            // Try to store an entity with the data in the request.
            $this->storeEntity();
            $response->addNotice(sprintf(
                _('%s correctly stored.'),
                ucfirst($this->getItemName())
            ));
        } catch (ValidatorException $exception) {
            // The entity could not be stored because of a validation error.
            // Add the error data to the response.
            $response->addErrorMessage(array(
                'validation' => $exception->getValidationStatus(),
            ));
        } catch (\Exception $exception) {
            // An unexpected error has occurred. Display the edition
            // page again.
            $response->addErrorMessage($exception->getMessage());
        }
        // Set the entity data into the response.
        $response->setData(
            $this->getItemName(),
            $this->getEntityData()
        );

        return $response;
    }
71098
protected function needVerification(ResponseInterface $response)
    {
        return $response->getStatusCode() === static::WAIT_RESPONSE_CODE
            && in_array($response->getHeaderLine('Server'), static::SERVER_NAME, true);
    }
43629
public function index($token, $email)
    {
        // Validate token
        $verificationToken = $this->emailVerificationRepository->getByUnexpiredToken($token);

        if (empty($verificationToken)) {
            return view('nodes.api::email-verification.invalid');
        }

        // Validate e-mail address
        if ($verificationToken->email != $email) {
            return view('nodes.api::email-verification.invalid');
        }

        // All good! Update user's password
        $status = $this->emailVerificationRepository->updateVerificationByEmail($verificationToken->email);
        if (empty($status)) {
            return view('nodes.api::email-verification.invalid')->with(['email' => $verificationToken->email, 'error' => 'Couldn\'t verify the user. Please contact administrator']);
        }

        // Mark token as used
        $verificationToken->markAsUsed();

        return view('nodes.api::email-verification.done')->with('success', 'User was successfully verified');
    }
1032945
public function verify($token)
    {
        $response = VerifyEmail::verify(Auth::user(), $token);

        switch ($response) {
            case VerifyEmail::EMAIL_VERIFIED:
                return redirect($this->redirectPath())->with('status', trans($response));

            default:
                return redirect()->back()
                            ->withErrors(['email' => trans($response)]);
        }
    }
1237816
public function checkEmailAction()
    {
        $email = $this->container->get('session')->get('fos_user_send_confirmation_email/email');
        $this->container->get('session')->remove('fos_user_send_confirmation_email/email');
        $user = $this->container->get('fos_user.user_manager')->findUserByEmail($email);

        if (null === $user) {
            throw new NotFoundHttpException(
                sprintf('The user with email "%s" does not exist', $email)
            );
        }

        return $this->container->get('templating')->renderResponse(
            'FOSUserBundle:Registration:checkEmail.html.'.$this->getEngine(),
            array(
                'user' => $user,
            )
        );
    }
385273
function(verificationId) {
    return new Promise((resolve, reject) => {
      this._start()
          .uri('/api/user/verify-email')
          .urlSegment(verificationId)
          .post()
          .go(this._responseHandler(resolve, reject));
    });
  }
1174111
public function verify(SS_HTTPRequest $request)
    {   
        $member = Member::get()->byID($this->getRequest()->param("ID"));
        $code = $this->getRequest()->param("OtherID");
        $verify = false;

        // Check verification group exists, if not, make it
        // Add a verified users group (only used if we turn on
        // verification)
        $verify_groups = Group::get()
            ->filter("Code", Users::config()->verification_groups);

        $this->extend("onBeforeVerify", $member);

        if (($member && $code) && $code == $member->VerificationCode) {
            foreach ($verify_groups as $group) {
                $group->Members()->add($member);
                $verify = true;
            }
        }

        $this->customise(
            array(
            "Title" => _t('Users.AccountVerification', 'Account Verification'),
            "MetaTitle" => _t('Users.AccountVerification', 'Account Verification'),
            "Content" => $this->renderWith(
                "UsersVerifyContent",
                array("Verify" => $verify)
            ),
            "Verify" => $verify
            )
        );

        $this->extend("onAfterVerify", $member);

        return $this->renderWith(
            array(
            "Users_Register_verify",
            "Users",
            "Page"
            )
        );
    }
959506
public function validation()
    {
        $validator = new Validation();
        
        $validator->add('email', new Email([
            'message' => 'Invalid email supplied'
        ]));

        $validator->add('email', new Uniqueness(array(
            'message' => 'Sorry, The email has been used by another user'
        )));

        return $this->validate($validator);
    }
1119395
public function show(Request $request)
    {
        return $request->user()->hasVerifiedEmail()
                        ? redirect($this->redirectPath())
                        : view('auth.verify');
    }
773551
public function confirmAction()
	{
		$context = $this->getContext();
		$client = \Aimeos\Client\Html::create( $context, 'checkout/confirm' );

		$view = $context->getView();
		$param = array_merge( \TYPO3\CMS\Core\Utility\GeneralUtility::_GET(), \TYPO3\CMS\Core\Utility\GeneralUtility::_POST() );
		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $param );
		$view->addHelper( 'param', $helper );

		$client->setView( $view );
		$client->process();

		$this->response->addAdditionalHeaderData( (string) $client->getHeader() );

		return $client->getBody();
	}
280863
public function verifyEmail()
    {
        $user = $this->_user;
        $user->status = User::STATUS_ACTIVE;
        return $user->save(false) ? $user : null;
    }