Advertisement
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 AccountController extends AbstractController
- {
- /**
- * @Route("/user/login", name="account_login")
- * @param AuthenticationUtils $utils
- * @return Response
- */
- public function login(AuthenticationUtils $utils)
- {
- $error = $utils->getLastAuthenticationError();
- $username = $utils->getLastUsername();
- return $this->render('account/login.html.twig', [
- 'hasError' => $error !== null,
- 'username' => $username,
- ]);
- }
- /**
- * @Route("/user/logout", name="account_logout")
- */
- public function logout(){
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement