background image
HomeRecent PostsDrupalSearchTagsRSSContactAboutAccount

Logging out a user when they close their browser

Eric.London's picture

I felt it would be more secure for a user to be logged out when they close their browser. This can be done by editing your settings.php file. The default location for this is /sites/ericlondon.com/settings.php. Located this line of code:

<?php
ini_set
('session.cookie_lifetime'2000000);
?>

And change it to:
<?php
ini_set
('session.cookie_lifetime'0);
?>

This is the default PHP setting.