Persistent login

tplenge - May 7, 2008 - 12:25

I am creating a site for elderly people, and to ease the use of the site, I would like the users to login only once. The users always use the same computer, hence the easiest way would be the default configuration of drupal as it remembers the login information in a cookie.

Of my research I have found that Drupal stores the session length in a cookie, and the settings are in:
\sites\default\settings.php, where I have set the parameter: ini_set('session.cookie_lifetime', 700000000);
This should set the cookie lifetime to 700000000 seconds, which is enough.

However users are still being logged off after one to two weeks time. What am I doing wrong ?

There is a module for

Wayne_Luke - May 7, 2008 - 18:09

There is a module for this.

http://drupal.org/project/persistent_login

Is is neccesairy

tplenge - May 8, 2008 - 08:53

Thanks, I have tried the module and it works, but is it necessary, as it complicates the log in process for my users, who have very limited IT skills?

I thought it would be enough to set the cookie lifetime, to allow the users to remain logged-in, when they are always connected from the same computer. But I don't understand why the users are being logged of, as i have removed the log out menu and set the cookie lifetime to a very long time.

Are there someone who can enlighten me with an explanation?
Many thanks

As far as I am aware,

Wayne_Luke - May 9, 2008 - 14:38

As far as I am aware, staying logged in within any modern system requires two pieces.

The first is a cookie and the second is a server-side session to match it to. I haven't looked at the code for Drupal in depth yet but you're not increasing the amount of time between session deletes. The persistant login modification seems to be able to do that or instructs the system to automatically recreate the session as needed.

This doesn't have to put an additional burden on your users. Just modify the module so that the box for persistant login is checked by default. Using the module will also help when a future upgrade comes down the line because you won't have to re-edit core code or potentially break your site with the upgrade.

Thanks

tplenge - May 11, 2008 - 08:47

I will try and see it it will solve my problem

Yes, good idea

ultracode - May 12, 2008 - 06:26

good idea I find now

Are there someone who can enlighten me with an explanation

ultracode - May 12, 2008 - 06:28

Are there someone who can enlighten me with an explanation

I thought it would be enough to set the cookie lifetime, to allow the users to remain logged-in, when they are always connected from the same computer. But I don't understand why the users are being logged of, as i have removed the log out menu and set the cookie lifetime to a very long time.

Are there someone who can enlighten me with an explanation?

How to login without menu link?

ultracode - May 12, 2008 - 06:32

How to login without menu link?

 
 

Drupal is a registered trademark of Dries Buytaert.