Restrict same user login in multiple machine

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
jklanka
Forum Newbie
Posts: 5
Joined: Thu Jun 29, 2006 6:51 am

Restrict same user login in multiple machine

Post by jklanka »

Hi,

How I can restrict a single user login to the web application at the same time from different machines.
User avatar
Attero
Forum Newbie
Posts: 18
Joined: Thu Jan 29, 2009 9:35 am
Location: Farnborough, UK

Re: Restrict same user login in multiple machine

Post by Attero »

Make a session table in your database. Store the session and delete it when a user has been inactive for xx amount of minutes or when they log out.

If the user tries to login but the session is still valid, then block entry, otherwise let them in and create a new session.

I'm not talking about $_SESSION either. I'm talking about database and $_COOKIE.
jklanka
Forum Newbie
Posts: 5
Joined: Thu Jun 29, 2006 6:51 am

Re: Restrict same user login in multiple machine

Post by jklanka »

Hi Attero,

The last sentence "I'm not talking about $_SESSION either. I'm talking about database and $_COOKIE" - cleared my all doubts.

Thanks a lot
Post Reply