title: FOSUserBundle register without password
body: <p>I am creating an application where visitors can upload some stuff (it will be for invited people only). At the end, if they are not logged in, they are asked to log in or create a user. If they create a new user, I only want to ask them to fill in their name and email. </p>
  
  <p>a password will be generated, and a mail will be sent to the user with the links to change their password if they want to (only to make the procedure as low level as possible).</p>
  
  <p>I can't seem to remove the password fields from the registration form. Can someone help me out. I create a custom form type, service and registered it. I also put custom templates in the app/Resource folder etc. Although my custom Form type AND the templates are being used, the password still appears ...</p>
  
  <pre><code>class RegistrationFormType extends BaseType {
  
    public function buildForm(FormBuilderInterface $builder, array $options) {
      parent::buildForm($builder, $options);
  
      // add your custom field
      $builder-&gt;add('username');
      $builder-&gt;add('email');
    }
  
    public function getName() {
      return 'val_user_registration';
    }
  
  }
  </code></pre>