programmatically login symfony2 after registration
===

i try to login the user manually after the registration with this code:

http://www.michelsalib.com/2011/04/pragmatically-authenticate-the-user-in-symfony2/

Its not working with the fresh created user, but when i login an other existing user after a userregistation, everything works fine.
I thought the user object isn't complete but i tried to read the registrerd user again and it doesn't work too.

Has anyone an idea what the problem is?

Thank you very much