Ejemplo n.º 1
0
 public function saveresearcherpass()
 {
     try {
         if (!Check::digits($rid = $_SESSION['user']['researcher_id'])) {
             throw new Exception("invalid researcher id!");
         }
         if ($_POST['password'] != $_POST['confirmpassword']) {
             throw new Exception("passwords don't match!");
         } else {
             $password = $_POST['password'];
         }
         if (!Check::validpassword($password)) {
             throw new Exception(Check::err());
         }
         $r = new Researcher();
         if ($r->upd($rid, array('password' => md5($password))) === false) {
             throw new Exception($r->err());
         }
         return 'home.tpl';
     } catch (Exception $e) {
         $this->err($e);
         View::assign('error', $this->error);
         return 'error.tpl';
     }
 }
Ejemplo n.º 2
0
 public function addResearcher(Researcher $l)
 {
     $this->collResearchers[] = $l;
     $l->setOrganization($this);
 }
Ejemplo n.º 3
0
 function getResearcherMain()
 {
     $researcher = new Researcher($this->user);
     return $researcher->getPage();
 }