コード例 #1
0
 /**
  * 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();
     }
 }
コード例 #2
0
ファイル: UserController.php プロジェクト: nidorx/Zend_Dao_Vo
    /**
     * 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();
    }