Cookies: Making them last longer than a session

by johnsonmlw — last modified Jun 03, 2011 09:13 AM
This will enable users to remain logged in beyond one browser session.

If a Plone instance is being used as an intranet, repetitive logging in is a barrier to ease-of-use. This can also apply to internet sites. This can be circumvented by allowing the user to remain logged in after they close their browser.

Setting cookie expiration length:

  • Call up the ZMI via http://your_portal_url/manage
  • Go to acl_users
  • Choose session
  • Alter "Cookie lifetime" to the number of days you wish to let your users stay logged in for.
  • Alter the "Cookie validity timeout" to either "0" (no timeout) or the number of seconds equivalent to the "Cookie lifetime" days.

That's it. Easy when you know how.

See the plone.session docs for more details.