What is up, guys.
I'm using PUGXMultiUserBundle on top of FOSUserBundle to register and login two different user entities.
Everything is working out of the box: I have my User class extending the base User class from FOSUserBundle and my two entities for both Seller and Customer that extend my User class.
I don't want my users to input their username, as email is the prefered login property. So in the setEmail() and setEmailCanonical() methods of my User class, I also set username and usernameCanonical with the email. This works fine, BUT.
The issue is with Twig. When I render a form_rest(form) at the end of my form, it submits correctly and user gets registered. But if I try to render the security token with form_widget(form._token), and submit, I end up in the same form, controller doesn't get executed, database remains unaltered, errors are not returned.
((The reason I do this is not to show the "username" input box, as I don't require it to my users.))
So the question is: What does form_rest() render, besides the _token hidden input, that is preventing my form to work properly?
Is there a better approach for what I'm trying to accomplish?
Thans in advance.