]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
2factor authentication via email
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / UserInformationType.php
index f0367d14f339809f781bff5b4255ad123e34187e..e06c937dae891553bbaa8ce9250194121e853d1f 100644 (file)
@@ -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',
         ));
     }