Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sfDoctrineGuardPlugin: login with email

I'm building a webapp with symgony1.4 and doctrine1.2, and I wanna use the sfDoctrineGuardPlugin, but I have a little problem.

sfDoctrineGuardPlugin is built to authenticate by username, but I need to change it to ask for an email.

Any idea how to do it?

like image 856
alcuadrado Avatar asked Mar 10 '10 16:03

alcuadrado


2 Answers

If I am understanding your question correctly, you want to allow login with e-mail.

sfDoctrineGuardPlugin supports login using e-mail or username, but in version 5.0.0 is broken, according to this ticket:

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

There is a patch there. Apply the patch and create an entry in your app.yml setting allow_login_with_email to true:

all:
  sf_guard_plugin:
    allow_login_with_email: true

Is this what you need?

like image 132
oznek Avatar answered Oct 13 '22 16:10

oznek


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

This has been written for propel, but probably is easily applicable with doctrine.

like image 41
Maerlyn Avatar answered Oct 13 '22 17:10

Maerlyn