MiconwareSession->init($this); $this->MiconwareSession->initWeb($this); $profil = $this->MiconwareSession->getCompany(); if(!empty($profil) and count($profil) > 0){ $workers = $this->DreamjobWorker->find('all',array('conditions' => array('DreamjobWorker.searchhidden'=>false))); $this->set("workers",$workers); $this->render('/Search/listworkers'); }else{ $con = $this->MiconwareSession->getOpeningCondition(); $openings = $this->DreamjobJobOpening->find('all',array('conditions' => $con)); $this->set("openings",$openings); $this->render('/Search/listopenings'); } } }