X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FForm%2FType%2FUserInformationType.php;h=e06c937dae891553bbaa8ce9250194121e853d1f;hb=3d3ed955f11006a408c6596eb9151a0afb28e721;hp=f0367d14f339809f781bff5b4255ad123e34187e;hpb=2878416f8b4d94fb5e64c2fa61861526a7654d3d;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php index f0367d14..e06c937d 100644 --- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php +++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php @@ -4,7 +4,7 @@ namespace Wallabag\CoreBundle\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class UserInformationType extends AbstractType { @@ -13,14 +13,22 @@ class UserInformationType extends AbstractType $builder ->add('name', 'text') ->add('email', 'email') + ->add('twoFactorAuthentication', 'checkbox', array('required' => false)) ->add('save', 'submit') + ->remove('username') + ->remove('plainPassword') ; } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function getParent() + { + return 'fos_user_registration'; + } + + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( - 'data_class' => 'Wallabag\CoreBundle\Entity\User', + 'data_class' => 'Wallabag\UserBundle\Entity\User', )); }