The solution to this is already posted by Vinni:
Check FOSUserBundle:RegistrationController authenticateUser method:
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use FOS\UserBundle\Model\UserInterface;
/**
* Authenticate a user with Symfony Security
*
* @param Boolean $reAuthenticate
*/
protected function authenticateUser(UserInterface $user)
{
$providerKey = $this->container->getParameter('fos_user.firewall_name');
$token = new UsernamePasswordToken($user, null, $providerKey,
$user->getRoles());
$this->container->get('security.context')->setToken($token);
}
On Wed, Nov 30, 2011 at 3:16 PM, Miguel Trias <
[email protected]> wrote:
> Hi Laurynas,
>
> Have you found any solution to this? Could you share it?
>
> Thanks!
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en