FOSUserBundle multiple user types

梦想的初衷 提交于 2019-12-20 20:39:17

问题


I am building an application where I have (at least) two different user types, let's say buyers and sellers. Each user type should have its own logic (registration form/process, profile, rights, ...) but I would like to use FOSUserBundle with each user, in order to have a common management on some points.

I am actually blocked by registration forms ; it happens that I can't declare different forms into FOSUserBundle, and after some research it seems to be impossible. Some answers that I found suggests to use my own registration form, but then

  1. How to link it with FOSUserBundle ?

  2. Should I populate myself the user table in controllers/forms ? This way the different users would allextends the User from FOSUserBundle, and then I should manage the different forms myself without extending those from FOSUserBundle ?

Thanks by advance


回答1:


The PUGXMultiUserBundle is what you are looking for. It extends FOSUserBundle and allows you to have different registration forms etc...



来源:https://stackoverflow.com/questions/15463150/fosuserbundle-multiple-user-types

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!