Two differents FOSUser in application

Posted by Jérôme Boé on Stack Overflow See other posts from Stack Overflow or by Jérôme Boé
Published on 2012-06-11T09:23:07Z Indexed on 2012/06/11 10:40 UTC
Read the original article Hit count: 202

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about symfony-2.0

Related posts about fosuserbundle