Reply to Re: How to restrict multiple login using a single account.

Your name:

Reply:


Posted by SterLo on 05/23/07 17:56

Jerry has the right idea.

Having the user session time out is fine - but can be counter
productive.
Having the user logged out if someone else logs in is a good way to go
since it alerts the user someone else has access to their account.

Blizzard does that :)

On May 22, 3:13 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> shankhar wrote:
> > Hi all,
>
> > In my project there is a requirement. If a user logged in at a time
> > since he/she logged out others are not allowed to loggin using the
> > same user name. That is to avoid multiple logins using a account. How
> > to do this?
>
> > I had got a idea and implemented.
>
> > 1. When a user logs in storing the username, ip, login time to db.
> > 2. When a User logs in i'll check the table whether the username
> > exists in the table or not if yes i'll not allow the user to login
> > else i'll allow to loggin.
> > 3. When he logs out i'll delete the record from the table. Then he/
> > she can login again.
>
> > But there is a problem in this the user can close the browser directly
> > or right click in the taskbar and close it or by pressing Alt + F4. So
> > for this i have to catch the things in Javascript and trigger the
> > logout.
>
> > Is is possible to catch the events in Javascript, if yes please
> > provide me.
>
> > Or Is there any other method to restrict multiple login using single
> > account.
>
> > Thanx in advance.
>
> > Shankhar
>
> There's no way to tell if the user closed his browser. Or turned off
> his computer, unplugged from his network or any of a number of things.
>
> You can use a short timeout, i.e. 15 minutes, and if they don't do
> something in that time period their session gets deleted.
>
> But one of the ones I like best is if one person logs on while another
> one is using that account, the first one is logged out automatically.
> It gets to be very annoying - and they soon stop sharing their account
> info with others.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация