| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 22 | public function login(AuthenticationUtils $authenticationUtils): Response |
|
| 17 | { |
||
| 18 | // if ($this->getUser()) { |
||
| 19 | // return $this->redirectToRoute('target_path'); |
||
| 20 | // } |
||
| 21 | 22 | $form = $this->createForm(FormLoginType::class); |
|
| 22 | // get the login error if there is one |
||
| 23 | 22 | $error = $authenticationUtils->getLastAuthenticationError(); |
|
| 24 | // last username entered by the user |
||
| 25 | 22 | $lastUsername = $authenticationUtils->getLastUsername(); |
|
| 26 | |||
| 27 | 22 | return $this->render('security/login.html.twig', [ |
|
| 28 | 22 | 'last_username' => $lastUsername, |
|
| 29 | 22 | 'error' => $error, |
|
| 30 | 22 | 'form' => $form->createView(), |
|
| 31 | ]); |
||
| 32 | } |
||
| 33 | |||
| 42 |