/** * Action inicial do sistema */ public function indexAction() { $auth = Zend_Auth::getInstance(); $identity = $auth->getIdentity(); if ($identity) { $this->view->identity = $identity; //Obtém o profile do usuario $this->view->profile = $this->_bsnUserProfile->get(); } }
/** * Renderiza o menu superior */ public function menuAction() { $toshow = array(); $identity = $this->_auth->getIdentity(); if ($identity) { $profile = $this->_bsnUserProfile->get(); $this->view->profile = $profile; } if ($identity) { $toshow['profile'] = true; } else { $toshow['login'] = true; } $this->view->toshow = $toshow; $this->view->identity = $identity; //Cria o redirecionador $this->createRedirect(); }