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'; } }
public function addResearcher(Researcher $l) { $this->collResearchers[] = $l; $l->setOrganization($this); }
function getResearcherMain() { $researcher = new Researcher($this->user); return $researcher->getPage(); }