PUGX / PUGXMultiUserBundle

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

Passing custom parameters to the template #78

Open anthony-bernardo opened 9 years ago

anthony-bernardo commented 9 years ago

Hi,

I want simply pass to the registration template, somes custom variables, but I don't know how to do !

Here the code of the controller :

/**
 * @Route("/register", name="company_registration")
 */
public function registrationCompanyAction(Request $request)
{

     return $this->container
        ->get('pugx_multi_user.registration_manager')
        ->register('AppBundle\Entity\Company');

}

Where can I do ?

Thank you !

greg-man commented 9 years ago

There is a solution in an old (closed) issue. https://github.com/PUGX/PUGXMultiUserBundle/issues/35. Sadly it requires you to patch the core file RegistrationManager.php.

I would like to see this feature in the official repo too!

leopro commented 9 years ago

@greg-man feel free to do a PR ;-)

greg-man commented 9 years ago

If I only knew how ... :-)

greg-man commented 9 years ago

Finally I tried, but the commit didn't pass the tests. I don't have an experience n unit testing so what can I do?

leopro commented 9 years ago

Tests are failing only on php 5.3 for a reason that tbh I don't know. I'm investigating.

Anyway have a look on my last comment here https://github.com/PUGX/PUGXMultiUserBundle/pull/90#issuecomment-123651641

leopro commented 9 years ago

Ok fixed.

gelhaimer commented 8 years ago

Did you really fixed it ? Master does not seem to embedded the new feature.