single connection per user on platform

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • theoni
    New Member
    • Feb 2008
    • 20

    single connection per user on platform

    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
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    What have you tried that did not work right?

    Comment

    • theoni
      New Member
      • Feb 2008
      • 20

      #3
      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

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        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.

        Comment

        • theoni
          New Member
          • Feb 2008
          • 20

          #5
          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

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            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?

            Comment

            • theoni
              New Member
              • Feb 2008
              • 20

              #7
              Originally posted by r035198x
              You tried firing an AJAX request when the page is closed?
              yes that is how i tried to implement it.

              Comment

              • r035198x
                MVP
                • Sep 2006
                • 13225

                #8
                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.

                Comment

                • rnd me
                  Recognized Expert Contributor
                  • Jun 2007
                  • 427

                  #9
                  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.

                  Comment

                  Working...