redirection good
This commit is contained in:
@@ -16,6 +16,10 @@ class LoginController extends AbstractController
|
||||
#[Route(path: '/login', name: 'app_login')]
|
||||
public function login(AuthenticationUtils $authenticationUtils, Security $security, Request $request): Response
|
||||
{
|
||||
if ($security->isGranted('ROLE_USER')) {
|
||||
return $this->redirectToRoute('home'); // Redirection pour utilisateurs connectés
|
||||
}
|
||||
|
||||
// get the login error if there is one
|
||||
$error = $authenticationUtils->getLastAuthenticationError();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user