_getParam('db'); $loginForm = new Application_Form_AuthLogin($_POST); if ($loginForm->isValid($loginForm)) { $adapter = new Zend_Auth_Adapter_DbTable( $db, 'users', 'username', 'password', 'MD5(CONCAT(?, password_salt))' ); $adapter->setIdentity($loginForm->getValue('email')); $adapter->setCredential($loginForm->getValue('password')); $result = $auth->authenticate($adapter); if ($result->isValid()) { $this->_helper->FlashMessenger('Erfolgreich angemeldet'); $this->redirect('/'); return; } } $this->view->loginForm = $loginForm; } }