/** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); // remove the password as we don't want other users to be able to // change the password $builder->remove('plainPassword'); }
/** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); // make the password field optional, as we don't want to change this // everytime we edit our user $builder->get('plainPassword')->setRequired(false); }