我想在控制器中做类似的事情来记录用户:
$user = $this->get('security.context')->getToken()->getUser(); $user->logOut();
symfony
symfony ×1