1
votes

I am using Symfony2 and Fosuserbundle on my website. But I have a problem when I want to reset my password.

  1. When I go to the /resetting/request page I first put my email.
  2. I receive an email with a link
  3. When I click at this link I can see a form with only the new password and a confirmation
  4. When I put the new password and the confirmation I receive this error message :

The lastname is required.

I didn't override the formtype or the controller, I just overrode the view like this on reset_content.html.twig

{% trans_default_domain 'FOSUserBundle' %}

<form action="{{ path('fos_user_resetting_reset', {'token': token}) }}" {{ form_enctype(form) }} method="POST" class="fos_user_resetting_reset">

    {{ form_widget(form) }}

    <div>
        <input class="btn btn-success" type="submit" value="{{ 'resetting.reset.submit'|trans }}" />
    </div>
</form>

What can I do to solve this problem ?

Thanks,

1
It's a bit few to understand what's the problem , but it seems that the username field is not present, but required. Is it possible that the form is different ? - Stormsson
Is there a constraint on last name? How is it configured? - A.L
I don't know where it can load another form, but my resetting form is not overrided I just overrode RegistrationType form. - Sandoche
I tried to remove constraint on last name (assert) but it's not changing anything, it's configurent on the class user that extends BaseUser - Sandoche

1 Answers

0
votes

I found the problem : I had in my user entity an assert notBlank for a boolean attribute that causes that problem with that message "The lastname is required."