I am using fos user bundle and pugx multi user bundle. I have read all the documentation and I am familiar with Symfony. The pugx multi-user package has a sample at every point, but one: successful registration.
- Samples of overriding controllers for generating forms => ok
- Samples of overriding templates for creating forms => ok
- Samples of a successful successful registration sample => nothing.
Here is my code:
class RegistrationController extends BaseController { public function registerAction(Request $request) { $response = parent::registerAction($request); return $response; } public function registerTeacherAction() { return $this->container ->get('pugx_multi_user.registration_manager') ->register('MyBundle\Entity\PersonTeacher'); } public function registerStudentAction() { return $this->container ->get('pugx_multi_user.registration_manager') ->register('MyBundle\Entity\PersonStudent'); } }
The problem is ->get('pugx_multi_user.registration_manager') , which the manager returns. In fos user overring controllers help they get either form or form.handler . I have hard times to βlinkβ them with the manager pugx_multi_user.
What code should be placed in registerTeacherAction() for setting roles for a teacher, and in registerStudentAction() - setting roles for successful registration of a student?
symfony controller fosuserbundle pugxmultiuserbundle
Olivier pons
source share