Hello,

if I remember correctly, there was a "remember me" check box in the login block in earlier drupal versions. Has it gone? If not, how can I activate it?
Background: I want users to be able to stay logged in until they log out...

Thanks,
Eric

Comments

gábor hojtsy’s picture

This is the default behaviour now.

kbahey’s picture

In the sites/default/settings.php (or whatever the one for your site is) as follows:

ini_set('session.cookie_lifetime', 2000000);

The 2000000 are seconds, so increase/decrease as needed for your site.
--
Consulting: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

Uwe Hermann’s picture

I filed an issue, as this should be documented in settings.php, IMHO. See #20013.

Uwe.
--
hermann-uwe.de | crazy-hacks.org | unmaintained-free-software.org

shane’s picture

I've noticed that session lifetime doesn't work the that I would expect. I would expect that any time I do *something* on my 4.5.2 site, the session cookie lifetime would start fresh.

I have frequently been "timed out" on my site, even though I have recently opened a page. I have tuned the timout limits, and it doesn't seem to matter, I get timed out eventually, no matter what.

Personally - I think being able to define the "remember me" functions at a user level is an absolute must. Leave it up to the user to determine their comfort level with leaving a session active on a computer. If you're on a foreign machine, you don't necessarily want your session remembered.

kbahey’s picture

I tried to make that argument, but failed. As you can see here http://drupal.org/node/2974 and http://drupal.org/node/17303

Specifically:

1. The admin should be able to set the length of the session, preferrably from a settings menu in Drupal

2. Like Google, Yahoo and others, there should be a remember me option that the user can select.

I lost the argument, and we settled for an obscure setting in settings.php, which sort of addresses point # 1 above. Point 2 is not addressed.

Read the above discussions for the counterarguments.
--
Consulting: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

eric-alexander schaefer’s picture

There is no settings file in this drupal installation, but the value gets set in htaccess.
But wenn I log in, close all browser windows and come back I am no longer logged in.
Any ideas?

Thanks, Eric

jakamph’s picture

I have neither a htaccess file or a settings file, so how do I get the cookie value set? Thanks!

kbahey’s picture

In pre-4.6, the file is called conf.php, AND cannot have the cookie settings.

In 4.6RC, the settings.php has the cookie lifetime in it and can be changed.

--
Consulting: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

chanon’s picture

Why doesn't Drupal have a user selectable "remember me" checkbox ?? What if the user is outside on a public pc?
Is there a patch for this ??

Tijmen’s picture

I would also like to see that option, i'm working on a site where people can post their travel story's so they will almost always login from a public computer....

benshell’s picture

It's the most asked for thing on my community website. People want to see a "Remember Me" type checkbox. Maybe when I upgrade from 4.5 to 4.6+ I will try to figure out how to get it back.

keizo’s picture

anyone come up with a solution for this?

bumpy’s picture

I would LOVE to know how to solve this. I'd be happy to write some code that either sets the PHPSESSID cookie as a session cookie or as a persistent cookie, but I don't know where to add this code.

Can someone please help me out here?

Thanks!