Is there a way to set the expiry time of the login cookie for users on the front end of an EE site?

I know there are hidden config variables for user_session_ttl but they don't seem to work if the Website session type is set to "Cookies only". With Sessions enabled the login system doesn't work properly.

This is on a 2.9.2 site.

  • Does it have to be front-end? Can you extend a session start hook and set it there, or is the cookie change triggered by a front-end specific event?
    – jrothafer
    Dec 4, 2015 at 13:07
  • It's a member driven site where logged in members have access to particular areas of the site. So yes, it needs to be front-end. I just want to change the default time after which a logged in user is automatically logged out.
    – foamcow
    Dec 4, 2015 at 21:53

1 Answer 1


Yes, there is. I had to ask EllisLabs to find it.

The config files aren't only config.php and database.php. On system/expressionengine/config, you can find remember.php. Edit the $config['remember_me_ttl'] variable;

It's safe to edit all config files. Just remind of them when updating EECMS.

  • Ah! Interesting. I'll give that at try tomorrow.
    – foamcow
    Dec 4, 2015 at 21:42
  • I think that only works with the "remember me" checkbox rather than changing the default cookie expiry time. But it may work (I wasn't using the remember me function but if this works I will reinstate it).
    – foamcow
    Dec 4, 2015 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.