Beispiel #1
0
 public function info()
 {
     $currentuser = $this->view->getVariable("currentusername");
     switch ($this->userMapper->userType($currentuser)) {
         case "organizador":
             $this->view->moveToFragment($currentuser);
             $this->view->redirect("organizador", "perfil");
             break;
         case "juradoPopular":
             $this->view->moveToFragment($currentuser);
             $this->view->redirect("juradoPopular", "perfil");
             break;
         case "juradoProfesional":
             $this->view->moveToFragment($currentuser);
             $this->view->redirect("juradoProfesional", "perfil");
             break;
         case "establecimiento":
             $establecimiento = $this->establecimientoMapper->findById($currentuser);
             $pincho = $this->pincho->pinchoValido($establecimiento);
             $this->view->setVariable("establecimiento", $establecimiento);
             $this->view->setVariable("pinchoEstab", $pincho);
             $this->view->render("establecimiento", "perfil");
             break;
     }
 }