Zubrag.com
December 11, 2018, 07:01:54 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]
  Print  
Author Topic: Loging out as soon as I close the browser  (Read 4644 times)
arek
Newbie
*
Posts: 3


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

Hello,

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

Logged
code monkey
Newbie
*
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);

to:--

// 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
Logged
Pages: [1]
  Print  
 
Jump to:  

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