removed encoder, set hasher
This commit is contained in:
parent
99e6e4a702
commit
303cbfdc99
|
@ -13,8 +13,15 @@ use Symfony\Component\Validator\Constraints\IsTrue;
|
||||||
use Symfony\Component\Validator\Constraints\Length;
|
use Symfony\Component\Validator\Constraints\Length;
|
||||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class RegistrationFormType
|
||||||
|
* @package App\Form
|
||||||
|
*/
|
||||||
class RegistrationFormType extends AbstractType
|
class RegistrationFormType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
|
@ -29,7 +36,7 @@ class RegistrationFormType extends AbstractType
|
||||||
])
|
])
|
||||||
->add('plainPassword', PasswordType::class, [
|
->add('plainPassword', PasswordType::class, [
|
||||||
// instead of being set onto the object directly,
|
// instead of being set onto the object directly,
|
||||||
// this is read and encoded in the controller
|
// this is read and hashed in the controller
|
||||||
'mapped' => false,
|
'mapped' => false,
|
||||||
'attr' => ['autocomplete' => 'new-password'],
|
'attr' => ['autocomplete' => 'new-password'],
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
|
@ -49,6 +56,9 @@ class RegistrationFormType extends AbstractType
|
||||||
->add('email', EmailType::class);
|
->add('email', EmailType::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
{
|
{
|
||||||
$resolver->setDefaults([
|
$resolver->setDefaults([
|
||||||
|
|
Loading…
Reference in New Issue