Title: Session time
Last modified: August 21, 2016

---

# Session time

 *  Resolved [alackofcolor](https://wordpress.org/support/users/alackofcolor/)
 * (@alackofcolor)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/session-time/)
 * Hello,
 * Is there any way to limit the amount of time the user stays logged in before 
   they need to enter the password again? Personally, I would like it if they had
   to enter the password every time they visited the page and it seems as though
   cookies or whatever are keeping that from happening, even after I delete a password
   that was used to enter previously.
 * [https://wordpress.org/plugins/friends-only/](https://wordpress.org/plugins/friends-only/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Gabe](https://wordpress.org/support/users/gabrielwhite/)
 * (@gabrielwhite)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/session-time/#post-4650702)
 * Hi,
 * The plugin doesn’t use cookies, but rather sessions. I’m not 100% sure how to
   achieve what you want, but here’s a guess for how you could modify the code to
   make the sessions timeout after 1 day:
 * At the very start of sentry.php you’ll see this code:
 *  // Define session key and start the session
    define (‘SESSION_KEY’, md5(site_url()));
   session_start(); session_name(‘fo_session’);
 * Change the first line to
 *  define (‘SESSION_KEY’, md5(site_url().date(“Ymd”)));
 * And the sessions should time out after each calendar day.
 * A bit of a hack, I know, but I think it should work.
 * Note I haven’t tested this, and I’m not an expert programmer, so please verify
   that it works.
 * Gabe

Viewing 1 replies (of 1 total)

The topic ‘Session time’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/friends-only.svg)
 * [Friends Only](https://wordpress.org/plugins/friends-only/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/friends-only/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/friends-only/)
 * [Active Topics](https://wordpress.org/support/plugin/friends-only/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/friends-only/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/friends-only/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Gabe](https://wordpress.org/support/users/gabrielwhite/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/session-time/#post-4650702)
 * Status: resolved