public function checkEmailAction()
    {
        $session = $this->getSession();
        $email = $session->get('silex_user_confirmation_email');

        if (empty($email)) {
            return $this->redirect('silex_user.register');
        }

        $session->remove('silex_user_confirmation_email');
        $user = $this->getUserManager()->findUserByEmail($email);

        if (null === $user) {
            throw new NotFoundHttpException(sprintf('The user with email "%s" does not exist', $email));
        }
        
        return $this->render('silex_user/registration/check_email.twig', [
            'user' => $user
        ]);
    }