I am starting to get pretty desperate... I can't get this working. I would just want that when I close my browser I would be logged out.

I have read several topics already made about this topic and I made this change:
ini_set('session.cookie_lifetime', 0)
and it works perfectly on IE an Opera, but _NOT_ with Firefox. With Firefox I have to always clear everything (cache, cookies), but this not good :/

Is there any solutions? I have already tried autologout module, but it doesn't provide solution.

Comments

JonoB’s picture

I'd be interested in an answer to this too.

aphoe’s picture

try making it a negative value i.e try

ini_set('session.cookie_lifetime', -1)

it works with IE

newbie88’s picture

is it work in firefox sir??? can I know it?

govindtotla’s picture

Hi all
I am also facing the same issue with drupal, cake, zend as well. I just want to logout a user if his browser closed unexpectedly and if he didn't set Remember me Option.
Situation is : i have tried JS onbeforeunload event also, but it need lots of extra efforts. But still it is not possible to make this in opera. I have also tried to set ini setting ini_set('session.cookie_lifetime', 0); but it also a failure.

Any can have a better option? As i have googled too much and found wordpress login process secure. which follows these cases. Or if anyone can discuss Wordpress login process to make secure login process with drupal and other php solutions.