I have a Symfony 2 application making use of FOSUserBundle. The app will be used by members of a number of different organisations, and I'd like them to be able to go to an organisation-specific URL in order to register, for example http://www.myapp.com/[organisation_name]/register
. How can I let FOSUserBundle handle the registration, but also add [organisation_name]
to the User record it creates?
My research suggests I might need to hook into a FOSUserBundle event (REGISTRATION_SUCCESS
?), but I'm not sure about the exact mechanics of that or getting info from the URL.