I'm working with Symfony3.
On the web site, user can login to the system.
Problem: Users session lifetime should equal 7 days, after that logout him! How can I implement this?
Thank you.
I'm working with Symfony3.
On the web site, user can login to the system.
Problem: Users session lifetime should equal 7 days, after that logout him! How can I implement this?
Thank you.
PHP will only issue a cookie once. The client is expected to store that cookie for the entire lifetime. A new cookie will only be issued when the session is destroyed, the browser cookie is deleted, or the session ID is regenerated using the migrate() or invalidate() methods of the Session class.
The initial cookie lifetime can be set by configuring NativeSessionStorage using the setOptions(array('cookie_lifetime' => 1234)) method.
In a real world example. This would be in your config.yml.
framework:
session:
cookie_lifetime: 1234