Hi,
I have a requirement. I want to log out user from dev portal once the user closes the tab/browser. I tried changing the settings.php file and setting the cookie life time to 0. But I read that it is not the correct approach. Can anyone tell me if there is a way to do it? also I used auto logout module and it is logging the user out after the time we have entered. I want the user to logout immediately.
Any help would be appreciated.
Thanks.
Zohaib Masood.
Hi,
1. Auto logout module logout user when timeout occurred.
2. Cookie-Lifetime =0,ini_set('session.cookie_lifetime', 0);will have a different effect in the firefox
WorkAround: <Not Sure Just Thinking>
Set the HomePage for the Browser to the www.name.com/logout, this will logout user
Hi thanks for the comment. I already tried auto logout. It is logging out after the time set ie. 28 mins in my dev portal. But if I close the browser immediately and reopen, it won't log out. Cookie lifetime I tried but it was working but I was told that it is not the best practice so I eliminated that idea. Also, if I set my homepage as logout then every time someone hits the home button, it will log the user out. That will be an issue.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |