PUGX / PUGXMultiUserBundle

An extension for FOSUserBundle to handle users of different types. Compatible with Doctrine ORM.
163 stars 96 forks source link

'salt' not set #77

Closed jernejpangersic closed 9 years ago

jernejpangersic commented 9 years ago

Hi,

I'm using your bundle to have 2 types of users:

pugx_multi_user:
  users:
    person:
        entity:
            class: JP\MyBundle\Entity\Person
        registration:
          form:
            type: JP\MyBundle\Form\Type\RegistrationPersonType
            name: fos_user_registration_form
            validation_groups:  [Registration, Default]
          template: JPMyBundle:Registration:person_registration.html.twig
        #profile:
          #form:
            #type: JP\MyBundle\Form\Type\ProfileUserOneFormType
            #name: fos_user_profile_form
            #validation_groups:  [Profile, Default]
    organisation:
        entity:
          class: JP\MyBundle\Entity\Organisation
        registration:
          form:
            type: JP\MyBundle\Form\Type\RegistrationOrganisationType
            name: fos_user_registration_form
            validation_groups:  [Registration, Default]
          template: JPMyBundle:Registration:organisation_registration.html.twig
        #profile:
          #form:
            #type: JP\MyBundle\Form\Type\ProfileUserTwoFormType

I have added this in my User entity by the way

    public function __construct()
    {
        parent::__construct();
    }

Is there any other part of relevant code that I forgot to add?

The registration for Persons works great, but it doesn't set the 'salt' for Organisations.

Any ideas? Thanks in advance :)

jernejpangersic commented 9 years ago

I had to add parent::__construct(); in my other "child" Entity