| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public function login(AuthenticationUtils $authenticationUtils): Response |
||
| 12 | { |
||
| 13 | if ($this->getUser()) { |
||
| 14 | return $this->redirectToRoute('piedweb_cms_admin_dashboard'); |
||
| 15 | } |
||
| 16 | |||
| 17 | // get the login error if there is one |
||
| 18 | $error = $authenticationUtils->getLastAuthenticationError(); |
||
| 19 | // last username entered by the user |
||
| 20 | $lastUsername = $authenticationUtils->getLastUsername(); |
||
| 21 | |||
| 22 | return $this->render('@PiedWebCMS/user/login.html.twig', [ |
||
| 23 | 'last_username' => $lastUsername, |
||
| 24 | 'error' => $error, |
||
| 25 | ]); |
||
| 33 |