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?
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.
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
, ?
sfDoctrineGuard , , . . - VARCHAR (128), . , , - sfguard, signin .. (, ). " ", " ".
, " ", , sfGuardUser.
, sfDoctrineGuardPlugin , , , .
, - , .
oznek, allow_login_with_email.
( , 5.0.0), . : /sfDoctrineGuardPlugin/lib/validator/sfGuardValidatorUser.class.php 44 :
/sfDoctrineGuardPlugin/lib/validator/sfGuardValidatorUser.class.php
$user = $this->getTable()->retrieveByUsername($username);
:
$user = $this->getTable()->$method($username);
( "$method" , )
$method