title: Symfony2: How to log user manually?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5886713/automatic-post-registration-user-authentication">Automatic post-registration user authentication</a>  </p>
  </blockquote>
  
  
  
  <p>I want to log in the user after registration. I can do this by sending POST request with username and password by javascript to /login_check. At least I think it might succeed. But better solution would be achieving it by php code in controller, but I don't know how to do this using Symfony2.</p>