Re: [Phplib-users] One User logged in at the same time...
Brought to you by:
nhruby,
richardarcher
From: Donncha O C. <don...@tr...> - 2001-11-07 12:27:10
|
You have to approach it in a different manner. I implemented this and it works very nicely to keep multiple users out of the one account :) When someone logs in, set a cookie on their machine with a session ID(SID) and record this session ID in a table along with their UID. There's only one record in that table per user. Each time they visit the site you check that table so that the UID matches the SID, if not, they must be logged in twice! What this does is effectively logout the first user. The second user gets in and knocks the first off. When the first user logs in again the SID is updated and the second user then gets logged out. This should discourage people sharing their login info fairly quickly and gets over the problem of trying to figure out when people logout! Donncha. Sascha Ragtschaa wrote: > > Hello, > > I have a problem. I am using PHPlib and need a way of authentification, in > which a user logs into a system, and will be recognized that he is a logged > user. If another user tries to log in with the same Account (username, > password), he has to be rejected. Only one user with the same account should > be in the system at one time! How can I do such thing with PHPlib? Did > anyone already write a function of that? > |