ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to set the expiration time of login in

July 23, 2009 6:13am

Subscribe [2]
  • #1 / Jul 23, 2009 6:13am

    ron00nor

    52 posts

    For login in members I use cookies. The exp_expiration cookie has a expiration time of one year. I want it 8 hours. Where can I change this setting?

  • #2 / Jul 23, 2009 6:36am

    Ingmar

    29245 posts

    You can’t (easily). The point of cookies is to allow the user to stay logged in. If you are concerned about security, consider using session ids.

  • #3 / Jul 23, 2009 3:07pm

    ron00nor

    52 posts

    I don’t mind hacking a bit because it is important that my users aren’t logged in longer then say 8 hours.
    Using session-id is a problem because of the forum. Some users of the forum seem to be logged out,for certain pages, although they are not. Refreshed a couple off times displays the page correct.
    If you could point me in the right direction how to adjust the expiration time, I would appreciate it very much.

  • #4 / Jul 23, 2009 4:05pm

    Ingmar

    29245 posts

    Take a look at core.session.php, line 416:

    // Cookie expiration:  One year
        $expire = (60*60*24*365);

    As I’ve said, it’s not supported, though.

  • #5 / Jul 23, 2009 4:41pm

    ron00nor

    52 posts

    Thanks very much

  • #6 / Jul 23, 2009 4:46pm

    Ingmar

    29245 posts

    My pleasure 😊

  • #7 / Jul 23, 2009 5:12pm

    ron00nor

    52 posts

    By the way I also changed the $expire in line 769 in function update_cookies(). This finally solved it.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases