Denying multi login

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Atiq
Forum Commoner
Posts: 26
Joined: Thu Feb 19, 2004 5:23 am

Denying multi login

Post by Atiq »

I am using a MSSQL server as a database. I want to prevet multi login.

Is there any technique . I have searched and not found any good technique.

I have seen some logics in which if some user logins with the login who is alredy looged in then the first will be thrown out. I don't want iit i simply want that the second person should not be able to login.

Reards,

Atiq
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

mark an account as logged in, during attempting to log someone in, check against if they are already logged in. kick out an error, if the account is in use..
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

This can be highly annoying for users though as if they leave themselfs logged in on one machine and then go to another they cant get in.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

which is why you add an "auto-logout" of sorts.. basically.. after x minutes of inactivity, the logged-in state goes away.. if the session comes back, he gets marked as logged in again.. if he comes back from a different machine, he can log in again.. so long as x minutes have passed.
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Yeah, but then the work-around is simply to wait 5 mins and you can login - which kinda makes the whole thing pointless, as you break the deny login just by waiting 300 seconds.

Why are you trying to do it Atiq? Im sure we can come up with a better method to help you.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

this will also disable the "old" session.
Post Reply