public function verifyEmailAction()
    {
        $userId = $this->params()->fromRoute('userId', null);
        $token = $this->params()->fromRoute('token', null);

        if ($userId === null || $token === null) {
            return $this->notFoundAction();
        }

        $user = $this->getUserMapper()->findById($userId);

        if (!$user) {
            return $this->notFoundAction();
        }

        if ($this->userRegistrationService->verifyEmail($user, $token)) {
            // email verified
            return $this->redirectToPostVerificationRoute();
        }

        // email not verified, probably invalid token
        $vm = new ViewModel();
        $vm->setTemplate('ht-user-registration/user-registration/verify-email-error.phtml');

        return $vm;

    }