protected function verify() { if (empty($this->id)) { $user = apiDB::getUserByEmail($_SERVER['PHP_AUTH_USER']); $this->id = $user->id; } if (empty($this->id)) { return $this->_response("User id not set. Cannot run \"verify\" without a valid user id.", 404); } if (empty($_GET["token"])) { return $this->_response("No token specified. Cannot run \"verify\" without a valid \"token\" parameter.", 404); } $message = ""; $code = apiDB::verifyUser($this->id, $_GET["token"], $message); return $this->_response($message, $code); }