NetTalk Central

Author Topic: login counter  (Read 4023 times)

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
login counter
« on: October 27, 2015, 06:34:35 PM »
Hello please need to solve a problem. I have a nettalk app where by users login in to use application. The users are only allowed two logins at a time and after that they get a message that they have used their max logins. UP to this stage I have it working fine. But here comes my issue also if a user does not logout just closes browser, the system needs to logout the user or at least does not count it when calculating if the user as reached their max login.
« Last Edit: October 27, 2015, 08:49:27 PM by olu »

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: login counter
« Reply #1 on: October 27, 2015, 07:19:14 PM »
A few things come to mind...

1) when a user re-logs in allow them to re-use the session value already activated in their browser. Obviously this does not work if they close and re-open their browser
2) change the timeout on the server to say 5 min so it would only be a prob if they closed the browser and tried to log back in within 5 min.
3) you might be able to store some unique cookie on their browser and rather than relying on session values use this to determine how many times they are logged in.

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
Re: login counter
« Reply #2 on: October 27, 2015, 08:53:48 PM »
Thanks kevin, but the main problem is forcing the logout after the browser closes. i have already found a solution to count how many times the user is logged in but it is the forcing of logout when user closes browser that am having problems with

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: login counter
« Reply #3 on: October 28, 2015, 10:10:29 PM »
Hi Olu,

what you want is not possible without web sockets or similar technology.

so your solution won't work without this so you need to add web sockers or re-think of your solution. My suggestions were a re-think.

Cheers,

Kev