Thursday, October 29, 2009

Re: How to: A user logs in from a second location and the first location's session gets killed?

Which token? Where do I get that "ID" from? The whole Session?

On Oct 28, 7:12 pm, Miles J <mileswjohn...@gmail.com> wrote:
> You need to save the session ID/token to the database. On each page
> load you check to see if the current ID/token matches the one in the
> database, if it does not, you log them out.
>
> So if A logs in and has a token, hell be fine.
> Once B logs in, a new token is created nad logged in the database.
> A will be logged out since his token does not match the DB one. B will
> be ok.
>
> On Oct 28, 9:48 am, "j0n4s.h4rtm...@googlemail.com"
>
> <j0n4s.h4rtm...@googlemail.com> wrote:
> > Hi,
>
> > the subject essentially asks the whole question already.
>
> > How did you detect that a user logs in from a second location, and
> > kick him from the first location? The first location should display a
> > warning on the next action that requires to be logged in like "You
> > have been logged out automatically on this machine because this user
> > was logged in at another location"...
>
> > Any hints?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: