2

我已经在 symfony 2 中配置了 fosuserbundle,我可以列出/显示详细信息/添加/编辑/删除用户组吗?

我搜索但找不到在用户注册表单中添加用户组选择字段的任何帮助。

4

1 回答 1

0

have your read how to override registration form ?

your could add a custom group field in your custom registration form. Beware if you use 'fos_user.group_manager.default' service to provide select options, you may not want to provide all fosuser groups in your registration form

You can listen to "FOSUserEvents::REGISTRATION_SUCCESS" event to assign the group after form is submitted and valid (User infos are not saved yet)

Hope this helped

于 2013-02-10T14:05:16.170 回答