sfDoctrineGuardPlugin:使用电子邮件登录

alc*_*ado 5 php doctrine symfony1

我正在使用symgony1.4和doctrine1.2构建一个webapp,我想使用sfDoctrineGuardPlugin,但我有一点问题.

sfDoctrineGuardPlugin用于通过用户名进行身份验证,但我需要将其更改为要求发送电子邮件.

知道怎么做吗?

小智 6

如果我正确理解您的问题,您希望允许使用电子邮件登录.

sfDoctrineGuardPlugin支持使用电子邮件或用户名登录,但根据此票证,版本5.0.0中断了:

http://trac.symfony-project.org/ticket/8919

那里有一个补丁.应用补丁并在app.yml设置allow_login_with_email中创建一个条目为true:

all:
  sf_guard_plugin:
    allow_login_with_email: true
Run Code Online (Sandbox Code Playgroud)

这是你需要的吗?


小智 5

http://bluehorn.co.nz/2009/06/12/symfony-12-propel-and-sfguardplugin-email-login/

这是为推进而写的,但可能很容易适用于学说.