0
votes

in a project, I need to have two separate users:

1) an organisation that can create content

2) a simple user that can use content created by organisations

I've separated my workflows in two bundles, let's say PublicBundle and OrgaBundle and both can be accessed using Symfony's host routing (one from example.com and the other from orga.example.com).

Both users need to be logged in to create or use content. Once logged in, users or organisations can access their workflow pages.

So here are my questions: How can you create these two user entities, with their login / register form? Is it possible to do that with FOSUserBundle?

Thanks!

Cyril

1

1 Answers

0
votes

I actually found two solutions to my problem:

1) Manually define two providers as explained on this blogs: http://devblog.labfiftyfive.com/defining-multiple-user-providers-for-multiple-firewalls-in-symfony2/

2) Using PUGXMultiUserBundle to generate multiple user type and manage entities with FOSUserBundle

The second solution works fine.