Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Controller;
- use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
- use Symfony\Component\Routing\Annotation\Route;
- use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
- class UserController extends AbstractController
- {
- /**
- * @Route("/user", name="user")
- */
- public function index()
- {
- return $this->render('user/index.html.twig', [
- 'controller_name' => 'UserController',
- ]);
- }
- /**
- * @Route("/login", name="security_login")
- */
- public function login(AuthenticationUtils $authenticationUtils)
- {
- return $this->render('user/login.html.twig', [
- 'last_username' => $authenticationUtils->getLastUsername(),
- 'error' => $authenticationUtils->getLastAuthenticationError()
- ]);
- }
- /**
- * @Route("/logout", name="security_logout")
- */
- public function logout()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment