FOSUserBundle
FOSUserBundle copied to clipboard
Registration CSRF intention
Hi all,
I want to render the registration form on every page if the user is not logged in. Therefore I print it manually. Unfortunately I get the invalid CSRF-Token message on submit...
I use
<input type="hidden" id="fos_user_registration_form__token" name="fos_user_registration_form[_token]" value="{{csrf_token('registration')}}">
in the form. 'registration' should be the right intention (as per RegistrationFormType.php), isn't it?
Thanks!
It was my fault. In the overriden RegistrationFormType I didn't set the intention in the setDefaults method. Now it works :+1: