use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
+use Symfony\Component\OptionsResolver\OptionsResolver;
class UserInformationType extends AbstractType
{
{
$builder
->add('name', 'text')
- ->add('email', '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',
));
}