ZF-11306: $auth was not declare



With the above form, we can now go about creating our login action for our authentication controller. This controller will be called "AuthController", and will be located at application/controllers/AuthController.php. It will have a single method called " loginAction()" which will serve as the self-posting action. In other words, regardless of the url was POSTed to or GETed to, this method will handle the logic. The following code will demonstrate how to construct the proper adapter, integrate it with the form:

class AuthController extends Zend_Controller_Action

    public function loginAction()
        $db = $this->_getParam('db');

        $loginForm = new Default_Form_Auth_Login($_POST);

        if ($loginForm->isValid()) {

            $adapter = new Zend_Auth_Adapter_DbTable(
                'MD5(CONCAT(?, password_salt))'


            $result = $auth->authenticate($adapter);

            if ($result->isValid()) {
                $this->_helper->FlashMessenger('Successful Login');


        $this->view->loginForm = $loginForm;



{quote}$auth is not declare.{quote}

we should add :



Code tags added

Fix r23866 in the trunk and merged to branch release 1.11 r23867 - thanks.