title: Symfony2: how to log user out manually in controller?
body: <p>i would like to do something like that in controller to log user out: </p>
  
  <pre><code>$user = $this-&gt;get('security.context')-&gt;getToken()-&gt;getUser();
  $user-&gt;logOut();
  </code></pre>