NetTalk Central

Author Topic: Delete session data from file if user doesn't use log out  (Read 3366 times)

HPabon

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
Delete session data from file if user doesn't use log out
« on: June 28, 2012, 08:18:14 PM »
Hi all,

How to delete session data from a TPS file if the user
doesn't click the log out button?

Regards

Hector

Rob de Jager

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Delete session data from file if user doesn't use log out
« Reply #1 on: June 28, 2012, 09:19:17 PM »
Hi Hector,

You won't know if the user has left the browser, so the only way to destroy sessions in this case is to set the session expiry time.

The "Session Timeout" is a template option - WebServer procedure / Settings / Advanced tab

Cheers


Rob

HPabon

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
Re: Delete session data from file if user doesn't use log out
« Reply #2 on: June 29, 2012, 06:48:25 AM »
Hi Rob,

I don't think session time-out will work here, as closing the browser is not the normal flow when you do a log in. 

Then, consider the PC OS freezing and user has to reboot. That is like closing abruptly the browser.

Closing the browser without log in out is not a normal event or processing. And I need to clean what ever data is in the file for that session or user after a non-normal session closing.

If its there no way to clean files when the user does not log out and simply close the browse, then garbage will stay for ever in the file.

Hector


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Delete session data from file if user doesn't use log out
« Reply #3 on: June 30, 2012, 03:45:37 AM »
There is a DeleteSession method in the WebHandler Hector, so you should add your custom cleanup tere, before the parent call.