1

I use FosUserBundle for the login/register actions

I want to have two or more User table as User, BackUser, ...

I need also two different firewalls:

firewalls: back: pattern: ^/back form_login: provider: fos_BackUser csrf_provider: form.csrf_provider login_path: /back/login check_path: /back/login_check logout: path: /back/logout target: /back anonymous: true main: pattern: ^/ form_login: provider: fos_User csrf_provider: form.csrf_provider logout: true anonymous: true 

But with FosUserBundle I cannot set two differents providers.

I found this on google: https://groups.google.com/group/symfony2/browse_thread/thread/17d3fb94a1e305f8/e5ef7243cd84b558?lnk=raot

the first solution look good for my needs but I cannot make it work.

Any ideas?

4
  • "I want to have two or more User table as User, BackUser, ..." That is either table inheritance, or roles. I assume "roles". Commented Apr 5, 2012 at 12:52
  • No I want to have two different table each can have roles But a "BackUser" is not suppose to connect in the Front. Commented Apr 5, 2012 at 13:17
  • 2
    What are the reasons why you can't just use one table for users, use and table inheritance or roles to separate front and back users? This is the common method to do what you want. Commented Apr 5, 2012 at 13:36
  • My specs says that I need to separate User and BackUser. Like they don't want a big table for all users and the user can access the back or not. They want it as if there is two site. Then a BackUser can login into the Front as a client maybe with the FosOAuthServerBundle Commented Apr 5, 2012 at 13:58

1 Answer 1

1

You should take a look at https://github.com/leopro/PUGXMultiUserSandbox This is a kind of "extension" for FOSUserBundle that allows you to have multiple user types. Hope that's what you're looking for !

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.