src/Controller/User/SecurityController.php line 13
<?php
namespace App\Controller\User;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
class SecurityController extends AbstractController
{
#[Route('/user/login', name: 'app_user_login')]
public function login(AuthenticationUtils $authenticationUtils): Response
{
if ($this->isGranted('IS_AUTHENTICATED_FULLY')) {
return $this->redirectToRoute('app_user_service_order');
}
return $this->render('pages/user/security/login.html.twig', [
'error' => $authenticationUtils->getLastAuthenticationError(),
'last_username' => $authenticationUtils->getLastUsername()
]);
}
#[Route('/user/logout', name: 'app_user_logout', methods: ['GET'])]
public function logout()
{
//
}
}