X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FForm%2FType%2FNewUserType.php;h=8aabc8bbbc40ecffdaabc6543e7a0928678329a9;hb=790573d45899504bdecd2573c8f64018e23b139e;hp=313a9aae8c9f8619b0c273815efd86572e533393;hpb=0e7971d8354b0923d2e8f38690b9fe46e695dd93;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index 313a9aae..8aabc8bb 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php @@ -1,9 +1,10 @@ add('username', 'text') - ->add('password', 'password', array( + ->add('username', 'text', array('required' => true)) + ->add('plainPassword', 'repeated', array( + 'type' => 'password', 'constraints' => array( new Constraints\Length(array( 'min' => 8, @@ -21,15 +23,15 @@ class NewUserType extends AbstractType new Constraints\NotBlank(), ), )) - ->add('email', 'text') + ->add('email', 'email') ->add('save', 'submit') ; } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( - 'data_class' => 'Wallabag\CoreBundle\Entity\User', + 'data_class' => 'Wallabag\UserBundle\Entity\User', )); }