title: Symfony2 password reset without overriding FOSUser
body: <p>I am trying to build a form that resets user password. I am using FOSUserBundle to manage users, but I don't want to override FOSUser resetting controller due to some architecture reasons</p>
  
  <p>So I decided to build my own type and controller to reset password</p>
  
  <p>PasswordResettingType.php </p>
  
  <pre><code>public function buildForm(FormBuilderInterface $builder, array $options)
  {
      $builder-&gt;add('plainPassword', RepeatedType::class, array(
          'type' =&gt; PasswordType::class,
          'attr' =&gt; ['class' =&gt; 'form-group has-feedback'],
          'first_options' =&gt; array('label' =&gt; false,
              'attr' =&gt; ['placeholder' =&gt; 'New Password']
              ),
          'second_options' =&gt; array('label' =&gt; false,
              'attr' =&gt; ['placeholder' =&gt; 'Repeat Password']),
          'invalid_message' =&gt; 'Passwords don't match',
      ));
  }
  
  public function configureOptions(OptionsResolver $resolver)
  {
      $resolver-&gt;setDefaults(array(
          'data_class' =&gt; 'CoreBundle\Entity\User',
          'csrf_token_id' =&gt; 'resetting'
      ));
  }
  </code></pre>
  
  <p>Resetting controller</p>
  
  <pre><code>/**
   * @Route("/reset/{token}", name="api_resetting_reset")
   */
  public function resetAction(Request $request, $token)
  {
      $userManager = $this-&gt;get('fos_user.user_manager');
  
      $user = $userManager-&gt;findUserByConfirmationToken($token);
  
      if (null === $user) {
          return $this-&gt;render('APIBundle:Resetting:error.html.twig');
      }
  
      $form = $this-&gt;createForm(PasswordResettingType::class, $user);
  
      $form-&gt;handleRequest($request);
  
      if ($form-&gt;isValid()) {
          $user-&gt;setConfirmationToken(null);
          $user-&gt;setPasswordRequestedAt(null);
          $user-&gt;setPlainPassword($form["plainPassword"]-&gt;getData());
          $userManager-&gt;updateUser($user);
  
          return $this-&gt;redirectToRoute('api_resetting_success');
      }
  
      return $this-&gt;render('APIBundle:Resetting:reset.html.twig', array(
          'token' =&gt; $token,
          'form' =&gt; $form-&gt;createView()
      ));
  }
  </code></pre>
  
  <p>reset.html.twig</p>
  
  <pre><code>{{ form_start(form) }}
  
          {% for passwordField in form.plainPassword %}
              &lt;div class="form-group has-feedback"&gt;
                  {{ form_widget(passwordField, { 'attr': {'class': 'form-control'} }) }}
                  &lt;span class="show"&gt;show&lt;/span&gt;
                  {{ form_errors(passwordField) }}
              &lt;/div&gt;
          {% endfor %}
  
      &lt;input type="submit" class="btn" value="Submit" /&gt;
  {{ form_end(form) }}
  </code></pre>
  
  <p>But when I submit form, new password is not set, ConfirmationToken and PasswordRequestedAt are not set to null.</p>