Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

single connection per user on platform

Question posted by: theoni (Newbie) on July 9th, 2008 07:04 AM
Hello all!

I am working on a platform and there is a restricted area when users need to login. The issue is that multiple users can login with the same username/password at the same time which I don't like. I want when a user logs in no other person to be able to log in the system with the same username/password. Is there a way I can implement that on the server? I have tried to implement the operation with php but it does not work right. I would highly appreciate any help.

Thank you
Theoni
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
r035198x's Avatar
r035198x
Administrator
10,647 Posts
July 15th, 2008
10:56 AM
#2

Re: single connection per user on platform
What have you tried that did not work right?

Reply
theoni's Avatar
theoni
Newbie
16 Posts
July 15th, 2008
06:36 PM
#3

Re: single connection per user on platform
Quote:
Originally Posted by r035198x
What have you tried that did not work right?


yes, there is no way to catch the user closing the browser. I have tried with javascript but it didn't work.

theoni

Reply
r035198x's Avatar
r035198x
Administrator
10,647 Posts
July 16th, 2008
06:09 AM
#4

Re: single connection per user on platform
You have several options that you can use to indicate that a user is logged it. Create a table for logged in users, or just add a logged in flag to your users table.

Reply
theoni's Avatar
theoni
Newbie
16 Posts
July 21st, 2008
07:42 AM
#5

Re: single connection per user on platform
Quote:
Originally Posted by r035198x
You have several options that you can use to indicate that a user is logged it. Create a table for logged in users, or just add a logged in flag to your users table.


how can I catch the closing browser it is not working with javascript

Reply
r035198x's Avatar
r035198x
Administrator
10,647 Posts
July 21st, 2008
08:04 AM
#6

Re: single connection per user on platform
Quote:
Originally Posted by theoni
how can I catch the closing browser it is not working with javascript


You tried firing an AJAX request when the page is closed?

Reply
theoni's Avatar
theoni
Newbie
16 Posts
July 22nd, 2008
06:02 AM
#7

Re: single connection per user on platform
Quote:
Originally Posted by r035198x
You tried firing an AJAX request when the page is closed?


yes that is how i tried to implement it.

Reply
r035198x's Avatar
r035198x
Administrator
10,647 Posts
July 22nd, 2008
06:30 AM
#8

Re: single connection per user on platform
Quote:
Originally Posted by theoni
yes that is how i tried to implement it.

Then you need to post the relevant parts of your code and explain where it fails.

P.S I'll now move this to the Javascript/AJAX forum.

Reply
rnd me's Avatar
rnd me
Expert
239 Posts
July 23rd, 2008
08:31 AM
#9

Re: single connection per user on platform
time the user out after 5 mins, allow cookies to maintain state, and prevent double login on the server using a persistent object, or even a csv file of active users or something.

Reply
Reply
Not the answer you were looking for? Post your question . . .
183,906 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
Top Javascript / DHTML / Ajax Forum Contributors