private function sanitize() { if (false === ($this->pm = GWF_PM::getByID(Common::getGet('pmid')))) { return $this->module->error('err_pm'); } if (false === $this->pm->canRead(GWF_Session::getUser())) { return $this->module->error('err_perm_read'); } // $this->term = Common::getGet('term', ''); return false; }
private function sanitizePM($pmid) { if (false === ($this->pm = GWF_PM::getByID($pmid))) { return $this->module->error('err_pm'); } if (!$this->pm->canRead($this->user)) { return $this->module->error('err_perm_read'); } $this->rec = $this->pm->getSender(); if ($this->rec->getID() === GWF_Session::getUserID()) { $this->rec = $this->pm->getReceiver(); } return false; }