我已经在 symfony 2 中配置了 fosuserbundle,我可以列出/显示详细信息/添加/编辑/删除用户组吗?
我搜索但找不到在用户注册表单中添加用户组选择字段的任何帮助。
我已经在 symfony 2 中配置了 fosuserbundle,我可以列出/显示详细信息/添加/编辑/删除用户组吗?
我搜索但找不到在用户注册表单中添加用户组选择字段的任何帮助。
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