Exemple #1
0
 public function myAccountAction()
 {
     $identity = (array) Zend_Auth::getInstance()->getIdentity();
     switch ($identity['role']) {
         case Table_Abstract::ROLE_CENTER:
             $t = new Table_Centers();
             $a = $t->getById($identity['id'])->toArray();
             break;
         case Table_Abstract::ROLE_COMPANY:
             $t = new Table_Companies();
             $a = $t->getById($identity['id'])->toArray();
             break;
         case Table_Abstract::ROLE_STAFF:
             $t = new Table_Users();
             $a = $t->getById($identity['id'])->toArray();
             break;
         case Table_Abstract::ROLE_CLIENT:
             $t = new Table_Users();
             $a = $t->getById($identity['id'])->toArray();
             break;
         case Table_Abstract::ROLE_APPROVER:
             $t = new Table_Approvers();
             $a = $t->getById($identity['id'])->toArray();
             break;
     }
     $this->view->assign('a', $a);
 }