Take the 2-minute tour ×

I am trying to figure out the registration process of the FosUserBundle and have been unable to do so.

I want to be able to register a user manually using custom fields and have been unable to see that in the code.

I have the registerAction in FosUserBundle and following it anywhere does not show me where the information is actually stored in the database:

public function registerAction()
        $form = $this->container->get('fos_user.registration.form');
        $formHandler = $this->container->get('fos_user.registration.form.handler');
        $confirmationEnabled = $this->container->getParameter('fos_user.registration.confirmation.enabled');

        $process = $formHandler->process($confirmationEnabled);
        if ($process) {
            $user = $form->getData();

            if ($confirmationEnabled) {
                $this->container->get('session')->set('fos_user_send_confirmation_email/email', $user->getEmail());
                $route = 'fos_user_registration_check_email';
            } else {
                $route = 'fos_user_registration_confirmed';

            $this->setFlash('fos_user_success', 'registration.flash.user_created');
            $url = $this->container->get('router')->generate($route);

            return new RedirectResponse($url);

        return $this->container->get('templating')->renderResponse('FOSUserBundle:Registration:register.html.'.$this->getEngine(), array(
            'theme' => $this->container->getParameter('fos_user.template.theme'),

How do I register a user manually?


share|improve this question
Did you even figure this out? i am having issues, particularly fromt he authenticateUser() function –  MrGlass Jul 24 '12 at 0:21

1 Answer 1

Have you read this in the FOSUserBundle docs?

Using the UserManager

Apparently the service UserManager has the responsibility to actually save and update the user, you could create your own UserManager by following the guide.

share|improve this answer

Your Answer


