CC-3110 : Password reset

basic functionality password reset using sendmail
This commit is contained in:
Naomi Aro 2011-12-21 16:01:29 -08:00
parent ac50c279f7
commit 52b0e3c5f9
26 changed files with 3024 additions and 23 deletions

View file

@ -43,7 +43,7 @@ class LoginController extends Zend_Controller_Action
if(Application_Model_Subjects::getLoginAttempts($username) >= 3 && $form->getElement('captcha') == NULL){
$form->addRecaptcha();
}else{
$authAdapter = $this->getAuthAdapter();
$authAdapter = Application_Model_Auth::getAuthAdapter();
//pass to the adapter the submitted username and password
$authAdapter->setIdentity($username)
@ -92,25 +92,6 @@ class LoginController extends Zend_Controller_Action
Zend_Auth::getInstance()->clearIdentity();
$this->_redirect('login/index');
}
/**
* Gets the adapter for authentication against a database table
*
* @return object
*/
protected function getAuthAdapter()
{
$dbAdapter = Zend_Db_Table::getDefaultAdapter();
$authAdapter = new Zend_Auth_Adapter_DbTable($dbAdapter);
$authAdapter->setTableName('cc_subjs')
->setIdentityColumn('login')
->setCredentialColumn('pass')
->setCredentialTreatment('MD5(?)');
return $authAdapter;
}
}