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 ?

Comments

Wayne_Luke’s picture

There is a module for this.

http://drupal.org/project/persistent_login

tplenge’s picture

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

Wayne_Luke’s picture

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.

tplenge’s picture

I will try and see it it will solve my problem

ultracode’s picture

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?

ultracode’s picture

How to login without menu link?

heine’s picture

Please do not litter the forum with "little to no content" containing posts. Those have been removed.

The Troubleshooting FAQ is there to tell you that /user or ?q=user provides the login page.

--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.