Reputation: 1772
I need to force logout a user after his account have been changed in a user management.
The only example I've found is how to logout a current user
$this->container->get('security.context')->setToken(null);
whereas I need to logout an arbitrary user.
Upvotes: 0
Views: 579
Reputation: 783
You cannot do that if you're using a native php session handler. Otherwise, it is possible to do that if you store sessions in database, see PdoSessionHandler to Store Sessions in the Database
Upvotes: 2