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

查看:88
本文介绍了FOSUserBundle多种用户类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个我拥有(至少)两种不同用户类型的应用程序,比如说买卖双方.每种用户类型都应该具有自己的逻辑(注册表单/过程,配置文件,权限等),但是我想对每个用户使用FOSUserBundle,以便在某些方面进行通用管理.

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.

我实际上被登记表所封锁;碰巧我无法在FOSUserBundle中声明不同的形式,经过一番研究似乎似乎是不可能的.我发现一些答案建议使用我自己的注册表格,但是

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. 如何将其与FOSUserBundle链接?

  1. How to link it with FOSUserBundle ?

我应该在控制器/表单中填充用户表吗? 这样,不同的用户将全部从FOSUserBundle扩展用户,然后我应该 自己管理不同的表单,而不必扩展这些表单 FOSUserBundle吗?

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 ?

多谢

推荐答案

您是什么 PUGXMultiUserBundle 寻找.它扩展了 FOSUserBundle ,并允许您使用其他注册表格等.

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

这篇关于FOSUserBundle多种用户类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆