March 28, 2020, 11:05:59 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
Author Topic: Loging out as soon as I close the browser  (Read 5586 times)
Posts: 3

« on: May 16, 2008, 02:51:42 PM »


the password_protect page is perfect for what I'm trying to accomplish.
I have one problem, that I need help with.

Right now I have the session to end (expire) after 1 min, which is good, but I also want the session to end as soon as I exit (close) the browser.
Meaning if I log in and copy the address from the address bar, and then close Explorer (or Firefox) and then reopen it again and paste the address, I want the login page to come up again... instead of going directly to the page.
If I went 1 min its good... it goes right to the login page, but I need it to work as well by just closing and reopening the browser...

Any suggestions on what needs to be added or changed?
Please help

code monkey
Posts: 1

« Reply #1 on: May 18, 2008, 05:04:31 PM »

try changing the following line in password_protect.php

// timeout in seconds
$timeout = (TIMEOUT_MINUTES == 0 ? 0 : time() + TIMEOUT_MINUTES * 60);


// timeout in seconds
$timeout = (TIMEOUT_MINUTES == 0 ? 0 : time() + TIMEOUT_MINUTES * 5);

this will change the time from 1 min to 5 seconds of inactivity
Pages: [1]
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC