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

sasafister's avatar

Session for logged user (dynamically()

I have session set on default 120 minutes. I would love to change that according to user, so for example, some users will still have 120 session, and some users will have session for year or so. What's the best approach to that challenge? Anyone?

0 likes
1 reply
Snapey's avatar

Use the remember token and then the users with the longer period will feel like their session is lasting all year.

Please or to participate in this conversation.