Created
March 31, 2015 08:22
-
-
Save wecc/b5e2a208b785232f8da4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php /** | |
| * @Route("/login/", name="login_route") | |
| */ | |
| public function loginAction(Request $request) | |
| { | |
| $authenticationUtils = $this->get('security.authentication_utils'); | |
| // get the login error if there is one | |
| $error = $authenticationUtils->getLastAuthenticationError(); | |
| // last username entered by the user | |
| $lastUsername = $authenticationUtils->getLastUsername(); | |
| return $this->render( | |
| 'security/login.html.twig', | |
| array( | |
| // last username entered by the user | |
| 'last_username' => $lastUsername, | |
| 'error' => $error, | |
| ) | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment