Studyon Minte9.com
ZF 1.0




Storage



#Application/modules/user/controllers/AuthController.php
<?php
class User_AuthController extends Zend_Controller_Action {

	public function indexAction() {
		
		....

		$result = Zend_Auth::getInstance()->authenticate($authAdapter);

		if ($result) {
					
			if ($result->isValid()) {
				$user = $authAdapter->getResultRowObject();
				$auth->getStorage()->write($user);
			}
		}
	}
}

#Application/modules/default/controllers/FrontendController.php
<?php
class FrontendController extends Zend_Controller_Action {

	public function indexAction() {
		$this->view->message = "Hello world";

		$auth = Zend_Auth::getInstance();
		
		if ($auth->hasIdentity()) {
			echo '<br><br> Welcome <i>' . $auth->getIdentity()->username . '</i> ';
		}
	}


http://akrabat.com/zend-auth-tutorial/
http://framework.zend.com/manual/en/zend.auth.html