首页 文章

FOSUserBundle更改登录表单名称

提问于
浏览
0

我'm currenlty developing a Symfony project, and I'm使用FOSUserBundle . 我正在自定义登录页面,我的问题是,我可以更改需要传递给/ login_check的登录表单名称吗?他们假设是_username和_password,但我可以将它们更改为其他任何内容吗?那么,我需要在哪里配置呢?

非常感谢,巴特

1 回答

  • 1

    在security.yml中,您可以为每个防火墙设置用户名和密码参数 .

    这取自SecurityBundle Configuration .

    firewalls:            # Required
        # Examples:
        somename:
            form_login:
                # field names for the username and password fields
                username_parameter: _username
                password_parameter: _password
    

相关问题