CC-4283: Password Reset: Please let user input username they want to reset

-done
This commit is contained in:
denise 2012-08-24 12:40:30 -04:00
parent ffa4c131ee
commit dc8e3da6db
4 changed files with 34 additions and 7 deletions

View file

@ -110,9 +110,16 @@ class LoginController extends Zend_Controller_Action
$request = $this->getRequest();
if ($request->isPost() && $form->isValid($request->getPost())) {
$user = CcSubjsQuery::create()
->filterByDbEmail($form->email->getValue())
->findOne();
if (is_null($form->username->getValue()) || $form->username->getValue() == '') {
$user = CcSubjsQuery::create()
->filterByDbEmail($form->email->getValue())
->findOne();
} else {
$user = CcSubjsQuery::create()
->filterByDbEmail($form->email->getValue())
->filterByDbLogin($form->username->getValue())
->findOne();
}
if (!empty($user)) {
$auth = new Application_Model_Auth();