Chciałbym zrobić oddzielny plik, dokładniej user.php i wyrenderować widok z /view/scripts/user oraz oczywiście użyć kontrolera UserController.php. Nie wiem jak się za to zabrać a projekt muszę wykonać jak najszybciej. Pomocy!

<?php class UserController extends Zend_Controller_Action { public function indexAction() { $this->view->assign('name', 'Panel klienta'); $this->view->assign('title', 'Panel klienta'); } } ?>
<?php $view = new Zend_View(); $message = $view->render('index.phtml'); ?>
<?php class UserController extends Zend_Controller_Action { public function indexAction() { } }
hello world
public function authAction() { $request = $this->getRequest(); $registry = Zend_Registry::getInstance(); $auth = Zend_Auth::getInstance(); $DB = Zend_Registry::get("DB"); $authAdapter = new Zend_Auth_Adapter_DbTable($DB); $authAdapter->setTableName('users') ->setIdentityColumn('email') ->setCredentialColumn('password'); $email = $request->getParam('email'); $password = $request->getParam('password'); $authAdapter->setIdentity($email); $authAdapter->setCredential($hash); $result = $auth->authenticate($authAdapter); if($result->isValid()){ //print_r($result); $data = $authAdapter->getResultRowObject(null,'password'); $auth->getStorage()->write($data); $this->_redirect('/users'); } else { $this->_redirect('/users/login'); } }