We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37258
    • 34 Posts
    Hello,

    I've been developing a fairly simple site for a client, it has a login feature but they have specifically requested that there only be one user that they will share amongst their members (who need granular tracking anyway!).

    I've got the login in place, protected the pages and everything works AOK. I'd rather not user a logout link - its a bit clunky, amd I don't expect users to use it. But I've noticed that logins session support seems to vary from browser to browser, in chrome for example, sessions are very persistant, whereas in safari the user simply needs to navigate away from the site and refresh.

    How does the Login snippet deal with sessions and where does it store them? Im presuming its not in the php session variable. Is there anyway I can change the timeout on a logged in session. I've checked

    I do hope someone can help cos I really dont fancy having to faff around with different login components now that everythings working smiley
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      Good question... I think Login defaults to the standard PHP session length... Consider putting in a Javascript redirect on all pages -- it should only show to logged in users, but the idea is that if the user sits idle for X minutes, then the site will log that user out by redirecting his browser to the logout page.
        • 40706
        • 128 Posts
        Instead of using Javascript for that auto-logout I would prefer an Meta element...

        <meta http-equiv="refresh" content="600;URL='http://example.com/logout'">