1

I'm logged with an user and then if I login with the same user on another browser/device I want to disconnect the first user and allow access to this new user.

How to get this?

Biruwon
  • 394
  • 1
  • 4
  • 18
  • 2
    You need to store session on your database to be able to remove it if one alreay exists. – j0k Dec 03 '12 at 11:27
  • 1
    How to achieve this? I found those links about event listener http://www.metod.si/login-event-listener-in-symfony2/ and PdoSessionHandler http://symfony.com/doc/current/cookbook/configuration/pdo_session_storage.html I've to store the id of the user and check on event listener if the same user has logged?. Any code example? – Biruwon Dec 03 '12 at 11:56

1 Answers1

0

I'm solved half.

I created this functionality following this link:

https://groups.google.com/d/msg/symfony2/pvBSmKl0g7I/yxYfgxH4IvwJ

It works but when option remember_me in security.yml and accessing checking this option doesn't works.

//security.yml

remember_me:
    key:      "%secret%"
    lifetime: 3600
    path:     ^/
    domain:   ~

The user is still logged. What's the problem? Cookies?

Biruwon
  • 394
  • 1
  • 4
  • 18