Loging problem

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
rekharajbans
Forum Newbie
Posts: 2
Joined: Wed Jun 17, 2009 11:40 pm

Loging problem

Post by rekharajbans »

can u tell me if one user login one site on one system.and when he try to login same site in other system than show user already login.how can i show it.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Loging problem

Post by requinix »

Track login and last-use times. If the user did something more than (the amount of time your session cookie lasts) ago then assume they've logged out.
If you have a way to log out manually you need a bit more logic: if the last thing they did was log out then okay; if they logged in/did something less than X minutes ago they're still logged in; if they logged in/did something more than X minutes ago then they're logged out.
Post Reply