PUGX / PUGXMultiUserBundle

An extension for FOSUserBundle to handle users of different types. Compatible with Doctrine ORM.
163 stars 96 forks source link

How to redirect the registration success/faillure overriding the controller ? #120

Open GauthierCoste opened 7 years ago

GauthierCoste commented 7 years ago

I have the controller working fine :

<?php
namespace UserBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class RegistrationStandardUserController extends Controller
{
    public function registerAction()
    {
        return $this->container
                    ->get('pugx_multi_user.registration_manager')
                    ->register('UserBundle\Entity\StandardUser');
    }
}

But I don't know how to override it. I will also need to make a step by step registration for the "Seller type" of user so I need to redirect on the secondStep i case of success, and same page in case of faillure. Right now, in case of faillure, I'm redirected on the FosUserBundleregistration page (and not my custom page which is something like "/pro/register"