|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Auto logoff????
Im currently developing a site, where it requires the user to register and login to use certain functions/pages of the site.
I orignally started the login script using session ids, but found that to be hackable, so now im using a database for people to login, their is one problem though. who logs out??? when you join a site? say your web-based email? do you just close your browser?? or do you logout?? well if your like me you just close the thing, and in this case, it leaves your logged in data, in the database, which i dont want, i thought i could make a script which deletes all logins which are older then 2 days, but that means that the script is run every time, and in some cases it wont delete any rows! so it ends up being that most of the time it does nothing. then it hit me i could make a script which runs when you close the browser, using the command onBeforeUnload="" in the body if the person is logged in. it would just bring up a small pop-up saying goodbye which distroys the login data?? would you guys find that anoying?? or do you have a better idea??? thanks in advance |
|
#2
|
|||
|
|||
|
I think that's a good idea. Maybe open the new window at 10x10, let it do its thing and then close it straight away. Don't need a confirmation msg.
|
|
#3
|
|||
|
|||
|
ok, well i tried that, and it works great! its not anoying at all, since it only flashes up for a few seconds, is their some way that i can make the window auto minimise using javascript???? their are still loopholes in the script, peoples connection droping out, but generally should help keep the login table to a min, and stop that small but much needed cpu power for more important things
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Auto logoff???? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|