• Resolved alackofcolor

    (@alackofcolor)


    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://www.ads-software.com/plugins/friends-only/

Viewing 1 replies (of 1 total)
  • Plugin Author Gabe

    (@gabrielwhite)

    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.