Welcome to Geeklog, Anonymous Friday, April 19 2024 @ 01:47 pm EDT

Geeklog Forums

Always Logged In?


Status: offline

RichardTowler

Forum User
Chatty
Registered: 03/10/05
Posts: 49
Location:UK
I would like to add an always logged in, tick box to the user page, and I was wondering if anyone knew if this is possible, and how it could be achieved, thanks.
GameFaction - For All Your Gaming Needs
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Earlier versions of Geeklog had an option to stay logged in for a year. It has been removed for security considerations, though.

Basically, what you would have to do is to set the expiry date for the 'password' cookie to, say, a few years in the future (you can't have a cookie that never expires). See usersettings.php for how this works at the moment (search for "setcookie").

bye, Dirk
 Quote

Status: offline

RichardTowler

Forum User
Chatty
Registered: 03/10/05
Posts: 49
Location:UK
thanks

so I'm guessing

setcookie ($_CONF['cookie_theme'], $A['theme'], time() + 31536000,

if i edit this for example to + 5184000 it would change the 1 month logged in time, to 2 months? as I'm guessing the options work off this one number and just divide it to fix the specific time frames.

So I would basically need to edit the user selections, any hints on where that can be found (the block/drop down menu)

thanks
GameFaction - For All Your Gaming Needs
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by RichardTowler: So I would basically need to edit the user selections, any hints on where that can be found (the block/drop down menu)

Those are stored in the database, table gl_cookiecodes.

bye, Dirk
 Quote

Status: offline

RichardTowler

Forum User
Chatty
Registered: 03/10/05
Posts: 49
Location:UK
thank you, think its done Smile
GameFaction - For All Your Gaming Needs
 Quote

Zim

Anonymous
determined
I would also like to give my users the ability to stay logged in (but with a 24 hour timer). I just can't seem to figure out how, having tried all of the above mentioned.

I'm quite happy to just make it the default policy, but what do I change to make the cookie expiration date today plus 86400 seconds? I'm running version 1.3.11sr1.
 Quote

Zim

Anonymous
hopeful
Even just a tiny hint? Embarassed
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Zim: I would also like to give my users the ability to stay logged in (but with a 24 hour timer).

The default is set in config.php:
Text Formatted Code
$_CONF['default_perm_cookie_timeout']   = 28800;
 

bye, Dirk
 Quote

All times are EDT. The time is now 01:47 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content