How can i do so only 1 can be online for the 1 user at the time? Idea ?
So you e.g can not login to User1 on one pc/browser and then on the other pc/browser login to
You could store the session ID (and last access time) in a database, and reject login attempts for users with different session IDs if the last-access time is too recent(say, within the past 20 minutes). Clear the ID on logout, of course.
Note, though, if a user closes their browser without logging out and then reopens it, they may well be locked out for a while (the 20 minutes above, or whatever interval you decide on), since they won't have the matching session cookie anymore.