Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple User entity #1419

Closed
rdspck opened this issue Feb 13, 2014 · 5 comments
Closed

Multiple User entity #1419

rdspck opened this issue Feb 13, 2014 · 5 comments

Comments

@rdspck
Copy link

rdspck commented Feb 13, 2014

Hi All,

i know this topic is already faced but maybe there're relevant news about it!? I need to handle:

  • two different User entity (two different DB tables with relation (not direct) between them..);
  • two different registration page (entity one has x fields, entity two has x+y fields);
  • user logged in has different content accorded by own entity type, and different user experience, but they must interact between them (like common social actions..).

Is possible manage this scenario with FOSUserBundle?
If i create User that extends FOSUserBundle and then User2 that extends User?

If not, anybody knows bundles to do that (in Symfony2)?

Thanks a lot,

@sstok
Copy link

sstok commented Feb 14, 2014

@rdspck
Copy link
Author

rdspck commented Feb 14, 2014

Hi sstok,

Obviously I'm looking for an explanation, not advertising..;)

@sstok
Copy link

sstok commented Feb 14, 2014

Using multiple users with the FOSUserBundle is not possible natively, PUGXMultiUserBundle did a good attempt but uses Doctrine table inheritance which requires one primary table for all users and breaks the lazy loading.

RollerworksMultiUserBundle works by allowing you to create your own user-system with the FOSUserBundle as basis, What it does in practice is reusing all the classes and services of the FOSUserBundle but with a different configuration.

@csvan
Copy link

csvan commented Mar 18, 2014

Asked this in a similar issue, but will ask here as well: is it possible to do this natively in FOSUB if my user classes all subclass the standard FOSUB User class? In that case, would it not be enough if I created separate registration forms for them?

@merk
Copy link
Member

merk commented Jul 9, 2014

A sufficient answer for multiple user types has been provided in the form of other bundles.

@merk merk closed this as completed Jul 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants