Ejemplo n.º 1
0
 static function getDebugOption()
 {
     $debugoption = DebugOption::getUserOption(EGS_USERNAME);
     if (!$debugoption->isLoaded()) {
         $debugoption = DebugOption::getCompanyOption(EGS_COMPANY_ID);
     }
     return $debugoption;
 }
Ejemplo n.º 2
0
 public function edit()
 {
     $id = $this->_data['username'];
     $this->_uses[$this->modeltype]->load($id);
     $user = $this->_uses[$this->modeltype];
     $this->view->set('current', $user->roles->getAssoc());
     $companies = new UsercompanyaccessCollection(DataObjectFactory::Factory('Usercompanyaccess'));
     $sh = new SearchHandler($companies, FALSE, FALSE);
     $sh->addConstraint(new Constraint('username', '=', $id));
     $sh->setFields(array('id', 'usercompanyid'));
     $companies->load($sh);
     $this->view->set('selected_companies', $companies->getAssoc());
     $this->view->set('username', $id);
     $this->view->set('edit', TRUE);
     $this->_new();
     $this->setTemplateName('new');
     $debug = DebugOption::getUserOption($id);
     $this->view->set('debug_id', $debug->id);
     $this->view->set('selected_options', $debug->getOptions());
 }