This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Get only one connected user at the same moment

New topics about Symfony 2 should go here

Get only one connected user at the same moment

by cruizsanchez » Tue May 05, 2015 3:29 pm

Hi everyone,
i want in symfony to get only one user connected at the same time, i really don't know how to do that ...

- Connecting with mozilla, i get my PHPSESSID=a9oe3oc1mjsdh4dmtbcp1ljkq4 for user 'Plop'
- Connecting with google chrome, i get my PHPSESSID=di14cim632ui2rda3471sbr8n0 for same user 'Plop'

I want invalidate mozilla's session to get only chrome session working, how can i do that? Or something else ?

please give me a hint or a tutorial if you don't/can't help..
Junior Member
Posts: 1
Joined: Tue May 05, 2015 3:02 pm

Re: Get only one connected user at the same moment

by karop » Sun May 17, 2015 1:36 pm

Every time you log in you could store actual session. When user logs in somewhere else the session changes. For every page user visits the session is checked and if different session with later creation date is present symfony loggs him out.

Maybe there's better way for that but I don't know what exactly you need it for.
Junior Member
Posts: 13
Joined: Tue Oct 02, 2012 4:25 pm