SfDoctrineGuardPlugin: email login

I am creating a webapp with symgony1.4 and doctrine1.2 and I want to use sfDoctrineGuardPlugin, but I have a little problem.

sfDoctrineGuardPlugin is created for authentication by username, but I need to change it to request an email.

Any idea how to do this?

+5
source share
4 answers

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

It was written for the movement, but is probably easily applicable to doctrine.

+5
source

If I understand your question correctly, you want to allow login to the system by email.

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

, ?

+5

sfDoctrineGuard , , . . - VARCHAR (128), . , , - sfguard, signin .. (, ). " ", " ".

, " ", , sfGuardUser.

, sfDoctrineGuardPlugin , , , .

+4

, - , .

oznek, allow_login_with_email.

( , 5.0.0), . : /sfDoctrineGuardPlugin/lib/validator/sfGuardValidatorUser.class.php 44 :

$user = $this->getTable()->retrieveByUsername($username);

:

$user = $this->getTable()->$method($username);

( "$method" , )

+1

All Articles