FOSUserBundle多种用户类型[英] FOSUserBundle multiple user types

本文是小编为大家收集整理的关于FOSUserBundle多种用户类型的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我正在构建一个应用程序,其中至少有两种不同的用户类型,例如买卖双方.每种用户类型都应具有自己的逻辑(注册表格/流程,配置文件,权利等),但是我想与每个用户一起使用fosuserbundle,以便在某些方面具有共同的管理.

我实际上被注册表所阻止;碰巧我无法将不同的形式声明为fosuserbundle,经过一些研究,似乎不可能.我发现的一些答案建议使用自己的注册表格,但随后

  1. 如何将其与fosuserbundle链接?

  2. 我应该用控制器/表单填充用户表吗? 这样,不同的用户将使用户从fosuserbundle中降低,然后我应该 我自己管理不同的形式,而没有从 fosuserbundle?

谢谢

推荐答案

pugxmultiuserbundle 是您想要的.它扩展了 fosuserbundle ,并允许您拥有不同的注册表格等...

本文地址:https://www.itbaoku.cn/post/2090758.html

问题描述

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

推荐答案

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