Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mbpp's avatar
Level 3

Redirect user to dashboard on Active Session

Hi there, sometime i go to the login page when i still have a session user active, so i wish to case the session is still active to redirect me to the dashboard, how can i implement it on the login page?

0 likes
3 replies
Snapey's avatar

you mean you want to know if the user is logged in?

mbpp's avatar
Level 3

Yes, and making this change in the AuthController since is in the login page, i notice for example in the Middleware RedirectIfAuthenticate isnt working well, because if i login to my account im going to the dashboard, but then if i try to go to login again, instead of redirecting me to the dashboard, it doesnt no thing, lets me be in the page when it shouldnt. If a user is logged in it should get out from the login and redirect to dashboard.

Please or to participate in this conversation.