public function create_apikey() { $this->muser->require_access("full"); $userid = $this->muser->get_userid(); $comment = $this->input->post("comment"); $comment = $comment === false ? "" : $comment; $access_level = $this->input->post("access_level"); $key = \service\user::create_apikey($userid, $comment, $access_level); return array("new_key" => $key); }
function apikeys() { $this->muser->require_access(); $userid = $this->muser->get_userid(); $apikeys = \service\user::apikeys($userid); $this->data["query"] = $apikeys["apikeys"]; $this->load->view('header', $this->data); $this->load->view($this->var->view_dir . 'apikeys', $this->data); $this->load->view('footer', $this->data); }
private function createApikey($userid, $access_level = "apikey") { return \service\user::create_apikey($userid, "", $access_level); }