Skip to content

Commit 9962551

Browse files
committed
minor #1269 Update SecurityController.php (seb-jean)
This PR was merged into the main branch. Discussion ---------- Update SecurityController.php I propose this PR to be in agreement with maker-bundle: https://github.com/symfony/maker-bundle/blob/main/src/Security/SecurityControllerBuilder.php#L38 Commits ------- 38e9adb Update SecurityController.php
2 parents a43b073 + 38e9adb commit 9962551

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controller/SecurityController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class SecurityController extends AbstractController
3636
public function login(Request $request, Security $security, AuthenticationUtils $helper): Response
3737
{
3838
// if user is already logged in, don't display the login page again
39-
if ($security->isGranted('ROLE_USER')) {
39+
if ($this->getUser()) {
4040
return $this->redirectToRoute('blog_index');
4141
}
4242

0 commit comments

Comments
 (0)