I face a problem with FOSUserBundle.
In my Symfony2 application, I want to implement two differents User.
I have one entity User, for basic user, and one entity UserPro with more informations.
My problem is that I want to configure my bundle with this two entities:
fos_user:
db_driver: orm
firewall_name: main
user_class: Btp\UserBundle\Entity\User
fos_userpro:
db_driver: orm
firewall_name: pro
user_class: Btp\UserProBundle\Entity\UserPro
And so, use fos_user and fos_userpro as provider in my security.yml.
I’m no sure it’s be possible. I obtain an error :
There is no extension able to load the configuration for “fos_userpro” (in /…./app/config/config.yml). Looked for namespace “fos_userpro”, found “framework”, “security”, …
And when I take a look in FOSUserBundle files, I feel that fos_user is not a configuration variable and is directly written in strings.
Thanks.
In your situation you need to make 4 different entity, user-registration,user-proregistration,users and Groups.For more details you need to look the symfony2 security.
Click the Link
In user-registration,user-proregistration you need an additional field user_id for relating these 2 entity with user.