Two differents FOSUser in application
- by Jérôme Boé
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.