getUser()) { return new RedirectResponse($params->get('issuer_url')); } // On fournit le form, mais il est traité par un authenticator $loginForm = $this->createForm(LoginType::class, null); $error = $authenticationUtils->getLastAuthenticationError(); if ($error) { if ($request->getSession()->has(SQLLoginUserAuthenticator::ERROR_LOGIN)) { $loginForm->get('login')->addError(new FormError($trans->trans('error.login', [], 'messages'))); $request->getSession()->remove(SQLLoginUserAuthenticator::ERROR_LOGIN); } if ($request->getSession()->has(SQLLoginUserAuthenticator::ERROR_PASSWORD)) { $loginForm->get('password')->addError(new FormError($trans->trans('error.password', [], 'messages'))); $request->getSession()->remove(SQLLoginUserAuthenticator::ERROR_PASSWORD); } if ($request->getSession()->has(SQLLoginUserAuthenticator::ERROR_PDO)) { $loginForm->addError(new FormError($trans->trans('error.pdo', [], 'messages'))); $request->getSession()->remove(SQLLoginUserAuthenticator::ERROR_PDO); } } return $this->render('login.html.twig', [ 'loginForm' => $loginForm->createView(), ]); } #[Route('/logout', name: 'logout')] public function logout(Request $request) { } }