/* Decoded by unphp.net */ load->model("Settings_model", "settings"); goto ZTGXP; rRbkT: $this->load->helper(["url", "language"]); goto JqiDs; fQ7Nh: $this->lang->load("auth"); goto qtREv; JqiDs: $this->form_validation->set_error_delimiters($this->config->item("error_start_delimiter", "ion_auth"), $this->config->item("error_end_delimiter", "ion_auth")); goto fQ7Nh; ZTGXP: $this->load->model("Log_model", "logging"); goto atrsH; LM0LD: $this->load->database(); goto jRvxL; jRvxL: $this->load->library("form_validation"); goto rRbkT; atrsH: } public function output_json($data) { $this->output->set_content_type("application/json")->set_output(json_encode($data)); } public function index() { goto pJUre; s3CnU: $setting = $this->settings->getSetting(); goto SOHyL; rP23x: redirect("install"); goto tgYP4; wyZF3: if (!$this->ion_auth->logged_in()) { goto ln7wp; } goto g1AEM; H6X_5: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password", "placeholder" => "Password", "class" => "form-control"]; goto E7VO8; D829q: $this->load->view("_templates/auth/_header", $this->data); goto Vp8s9; kcmqy: Ud02s: goto wyZF3; XOTtC: ln7wp: goto IzPpx; g1u1S: redirect("dashboard"); goto XOTtC; njARH: redirect("install"); goto kcmqy; E7VO8: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto D829q; Vp8s9: $this->load->view("auth/login"); goto HzQU2; ved24: $this->data["identity"] = ["name" => "identity", "id" => "identity", "type" => "text", "placeholder" => "Username", "autofocus" => "autofocus", "class" => "form-control", "autocomplete" => "off"]; goto H6X_5; g1AEM: $user_id = $this->ion_auth->user()->row()->id; goto f90i0; IzPpx: $this->data["setting"] = $setting; goto ved24; tgYP4: sjCkv: goto s3CnU; f90i0: $group = $this->ion_auth->get_users_groups($user_id)->row()->name; goto g1u1S; HzQU2: $this->load->view("_templates/auth/_footer"); goto gJ1Xw; pJUre: if (!(count($this->db->list_tables()) == 0)) { goto sjCkv; } goto rP23x; SOHyL: if (!($setting == null)) { goto Ud02s; } goto njARH; gJ1Xw: } public function cek_login() { goto ifbct; spoA1: IJaWk: goto cev20; lJriT: $this->form_validation->set_rules("password", str_replace(":", '', $this->lang->line("login_password_label")), "required|trim"); goto yoHkX; cxwdX: $remember = (bool) $this->input->post("remember"); goto eHXpj; yHgOl: $data = ["status" => false, "invalid" => $invalid]; goto UVvIe; UVvIe: $this->output_json($data); goto QHqwb; HZAxe: goto IJaWk; goto A1O2d; eHXpj: if ($this->ion_auth->login($this->input->post("identity"), $this->input->post("password"), $remember)) { goto VEWFx; } goto XH348; yoHkX: if ($this->form_validation->run() === TRUE) { goto IM6Ra; } goto CN9L2; icmyR: $this->cek_akses(); goto spoA1; Nx6vF: IM6Ra: goto cxwdX; QHqwb: goto hJYm8; goto Nx6vF; w6qZJ: $this->output_json($data); goto HZAxe; A1O2d: VEWFx: goto icmyR; cev20: hJYm8: goto KRUuF; XH348: $data = ["status" => false, "failed" => "Incorrect Login"]; goto w6qZJ; CN9L2: $invalid = ["identity" => form_error("identity"), "password" => form_error("password")]; goto yHgOl; ifbct: $this->form_validation->set_rules("identity", str_replace(":", '', $this->lang->line("login_identity_label")), "required|trim"); goto lJriT; KRUuF: } public function cek_akses() { goto a2ICy; gGAwG: $status = false; goto gu38M; PkS1N: $this->logging->saveLog(1, "Login"); goto ZEhjI; PZOOD: goto cWU9b; goto Ax_mB; Frsol: $data = ["status" => $status, "url" => $url]; goto R2RSW; ZEhjI: $url = "dashboard"; goto PZOOD; R2RSW: $this->output_json($data); goto nh6Ba; Ax_mB: JuGeV: goto gGAwG; qQ_ZY: cWU9b: goto Frsol; gu38M: $url = "auth"; goto qQ_ZY; zrV5v: $status = true; goto PkS1N; a2ICy: if (!$this->ion_auth->logged_in()) { goto JuGeV; } goto zrV5v; nh6Ba: } public function logout() { $this->ion_auth->logout(); redirect("login", "refresh"); } public function change_password() { goto KRemp; Hj3Pw: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto QCSaF; Mslzf: if ($this->ion_auth->logged_in()) { goto HWtQc; } goto fhtcG; KRemp: $this->form_validation->set_rules("old", $this->lang->line("change_password_validation_old_password_label"), "required"); goto bwpg_; VJLLX: $this->logout(); goto ZaTLu; HdUlC: if ($change) { goto guWaq; } goto aE2kB; WOB3A: lW0f3: goto Hj3Pw; fMWoC: goto ku6H4; goto G5lNS; u3JPO: nqLCi: goto azOdS; PWquq: redirect("auth/change_password", "refresh"); goto fMWoC; ZZ1Bq: $this->data["new_password_confirm"] = ["name" => "new_confirm", "id" => "new_confirm", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto gAuXx; aE2kB: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto PWquq; NPw3Q: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto VJLLX; QCSaF: $this->data["min_password_length"] = $this->config->item("min_password_length", "ion_auth"); goto Tdmhi; fhtcG: redirect("auth/login", "refresh"); goto zxmCV; MPkXj: $identity = $this->session->userdata("identity"); goto Y2rX2; bwpg_: $this->form_validation->set_rules("new", $this->lang->line("change_password_validation_new_password_label"), "required|min_length[" . $this->config->item("min_password_length", "ion_auth") . "]|matches[new_confirm]"); goto IuIB0; IuIB0: $this->form_validation->set_rules("new_confirm", $this->lang->line("change_password_validation_new_password_confirm_label"), "required"); goto Mslzf; ZaTLu: ku6H4: goto CX7mU; G5lNS: guWaq: goto NPw3Q; v0eP7: if ($this->form_validation->run() === FALSE) { goto lW0f3; } goto MPkXj; JXB0e: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "change_password", $this->data); goto u3JPO; Y2rX2: $change = $this->ion_auth->change_password($identity, $this->input->post("old"), $this->input->post("new")); goto HdUlC; Tdmhi: $this->data["old_password"] = ["name" => "old", "id" => "old", "type" => "password"]; goto zKzp5; gAuXx: $this->data["user_id"] = ["name" => "user_id", "id" => "user_id", "type" => "hidden", "value" => $user->id]; goto JXB0e; zKzp5: $this->data["new_password"] = ["name" => "new", "id" => "new", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto ZZ1Bq; MoVJl: $user = $this->ion_auth->user()->row(); goto v0eP7; CX7mU: goto nqLCi; goto WOB3A; zxmCV: HWtQc: goto MoVJl; azOdS: } public function forgot_password() { goto Vsdhr; oPn2q: if ($this->config->item("identity", "ion_auth") != "email") { goto qyu81; } goto YZv0P; sIhma: jJ9yu: goto aYLli; aeUVr: if ($this->config->item("identity", "ion_auth") != "email") { goto B_wBg; } goto pjpOK; g7r02: kBT2o: goto K53oH; Q1IAf: if (!empty($identity)) { goto kBT2o; } goto aeUVr; Uy0k8: $this->data["identity_label"] = $this->lang->line("forgot_password_identity_label"); goto QvC4V; dNOCW: $this->ion_auth->set_error("forgot_password_identity_not_found"); goto uNdAl; Dmj4o: $this->data["type"] = $this->config->item("identity", "ion_auth"); goto JolaQ; PfOvi: $this->load->view("auth/forgot_password"); goto ILW0e; K53oH: $forgotten = $this->ion_auth->forgotten_password($identity->{$this->config->item("identity", "ion_auth")}); goto UF_Ja; JolaQ: $this->data["identity"] = ["name" => "identity", "id" => "identity", "class" => "form-control", "autocomplete" => "off", "autofocus" => "autofocus"]; goto oPn2q; KYaY6: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto H7n18; aYLli: goto fVQOp; goto wrnSk; H976h: redirect("auth/forgot_password", "refresh"); goto sIhma; UF_Ja: if ($forgotten) { goto spM7j; } goto BRZWd; LD3EY: goto jJ9yu; goto o1Ye_; VnHyr: $this->form_validation->set_rules("identity", $this->lang->line("forgot_password_identity_label"), "required"); goto IdHeZ; UoY1L: redirect("auth/forgot_password", "refresh"); goto LD3EY; Vsdhr: $this->data["title"] = $this->lang->line("forgot_password_heading"); goto pa99G; aR25M: goto xN9qc; goto J7M9O; pjpOK: $this->ion_auth->set_error("forgot_password_email_not_found"); goto pyFHz; pyFHz: goto Tukto; goto BEkcw; H3g1H: goto LCBBR; goto qFuxP; gEy1_: $identity_column = $this->config->item("identity", "ion_auth"); goto UMzlt; H7n18: redirect("auth/forgot_password", "refresh"); goto g7r02; o1Ye_: spM7j: goto pXE9x; UMzlt: $identity = $this->ion_auth->where($identity_column, $this->input->post("identity"))->users()->row(); goto Q1IAf; pa99G: if ($this->config->item("identity", "ion_auth") != "email") { goto uibkz; } goto VS3Cy; IdHeZ: LCBBR: goto jC9vy; ApJVI: $this->load->view("_templates/auth/_header", $this->data); goto PfOvi; BRZWd: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto UoY1L; VS3Cy: $this->form_validation->set_rules("identity", $this->lang->line("forgot_password_validation_email_label"), "required|valid_email"); goto H3g1H; pXE9x: $this->session->set_flashdata("success", $this->ion_auth->messages()); goto H976h; BEkcw: B_wBg: goto dNOCW; qFuxP: uibkz: goto VnHyr; wrnSk: aCel0: goto Dmj4o; jC9vy: if ($this->form_validation->run() === FALSE) { goto aCel0; } goto gEy1_; YZv0P: $this->data["identity_label"] = $this->lang->line("forgot_password_email_identity_label"); goto aR25M; JczdH: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto ApJVI; uNdAl: Tukto: goto KYaY6; ILW0e: $this->load->view("_templates/auth/_footer"); goto T0pbR; J7M9O: qyu81: goto Uy0k8; QvC4V: xN9qc: goto JczdH; T0pbR: fVQOp: goto mma5q; mma5q: } public function reset_password($code = NULL) { goto zKzQj; rMI0u: $this->ion_auth->clear_forgotten_password_code($identity); goto tvcpT; zKzQj: if ($code) { goto EuSNA; } goto CKhze; Si_W1: $identity = $user->{$this->config->item("identity", "ion_auth")}; goto Ulndi; nT36R: goto ByPkU; goto pj2n0; pj2n0: hSW1m: goto Ne6Pj; Kynif: p8EMC: goto xXqGb; PGo63: $this->data["user_id"] = ["name" => "user_id", "id" => "user_id", "type" => "hidden", "value" => $user->id]; goto ERe8l; Ajglh: E2kg5: goto iKCgX; tvcpT: show_error($this->lang->line("error_csrf")); goto Ajglh; gtklh: if ($change) { goto hSW1m; } goto UaoOR; Obzbl: ByPkU: goto KxKCP; OEkl8: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto j8_Wf; nNY5f: vS5ZE: goto xOjD0; QRR7G: $this->data["new_password"] = ["name" => "new", "id" => "new", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto nflFq; Ulndi: if ($this->_valid_csrf_nonce() === FALSE || $user->id != $this->input->post("user_id")) { goto igx3d; } goto FgpDB; DAT0Z: $this->load->view("_templates/auth/_footer"); goto nNY5f; xOjD0: ge9UZ: goto KjjSo; Ne6Pj: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto CMrwD; SrqMY: $this->data["title"] = $this->lang->line("reset_password_heading"); goto OG8Tp; iKCgX: goto vS5ZE; goto Kynif; Rulrw: $this->data["code"] = $code; goto sVfPu; OG8Tp: $user = $this->ion_auth->forgotten_password_check($code); goto t3Vf3; j8_Wf: redirect("auth/forgot_password", "refresh"); goto Cez7K; Z6f3T: $this->form_validation->set_rules("new", $this->lang->line("reset_password_validation_new_password_label"), "required|min_length[" . $this->config->item("min_password_length", "ion_auth") . "]|matches[new_confirm]"); goto Jch6S; hIWTT: igx3d: goto rMI0u; ERe8l: $this->data["csrf"] = $this->_get_csrf_nonce(); goto Rulrw; FgpDB: $change = $this->ion_auth->reset_password($identity, $this->input->post("new")); goto gtklh; KxKCP: goto E2kg5; goto hIWTT; CMrwD: redirect("auth/login", "refresh"); goto Obzbl; nflFq: $this->data["new_password_confirm"] = ["name" => "new_confirm", "id" => "new_confirm", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto PGo63; sVfPu: $this->load->view("_templates/auth/_header"); goto iboR4; xXqGb: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto HLwz3; t3Vf3: if ($user) { goto qCk3H; } goto OEkl8; Cez7K: goto ge9UZ; goto GIZH0; HLwz3: $this->data["min_password_length"] = $this->config->item("min_password_length", "ion_auth"); goto QRR7G; Z9AAm: if ($this->form_validation->run() === FALSE) { goto p8EMC; } goto Si_W1; CKhze: show_404(); goto uuCJR; D1VVH: redirect("auth/reset_password/" . $code, "refresh"); goto nT36R; iboR4: $this->load->view("auth/reset_password", $this->data); goto DAT0Z; uuCJR: EuSNA: goto SrqMY; UaoOR: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto D1VVH; Jch6S: $this->form_validation->set_rules("new_confirm", $this->lang->line("reset_password_validation_new_password_confirm_label"), "required"); goto Z9AAm; GIZH0: qCk3H: goto Z6f3T; KjjSo: } public function activate($id, $code = FALSE) { goto JNcGq; YvTG1: goto haGoS; goto hPU5q; LkTSX: PmJJs: goto avDph; MxDMx: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto Y8uzh; BmESD: haGoS: goto EYR1g; rhnfM: zpBnI: goto YvTG1; bMN9p: cNypq: goto ASJE6; NyAF5: redirect("auth", "refresh"); goto LkTSX; uz9dc: $activation = $this->ion_auth->activate($id, $code); goto BmESD; OaTIq: $activation = $this->ion_auth->activate($id); goto rhnfM; Fs1kw: if (!$this->ion_auth->is_admin()) { goto zpBnI; } goto OaTIq; JNcGq: $activation = FALSE; goto m703C; ASJE6: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto NyAF5; hPU5q: vF_Bw: goto uz9dc; bUaoK: goto PmJJs; goto bMN9p; m703C: if ($code !== FALSE) { goto vF_Bw; } goto Fs1kw; Y8uzh: redirect("auth/forgot_password", "refresh"); goto bUaoK; EYR1g: if ($activation) { goto cNypq; } goto MxDMx; avDph: } public function deactivate($id = NULL) { goto O4eQG; REAoh: $this->form_validation->set_rules("confirm", $this->lang->line("deactivate_validation_confirm_label"), "required"); goto TcxVP; TcxVP: $this->form_validation->set_rules("id", $this->lang->line("deactivate_validation_user_id_label"), "required|alpha_numeric"); goto Y9KnY; W4fGO: show_error($this->lang->line("error_csrf")); goto cnUZt; ReaqN: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "deactivate_user", $this->data); goto GDvOa; Fpc0r: redirect("auth", "refresh"); goto c512s; F9IlA: JAk0I: goto XmDW6; R18q7: $this->ion_auth->deactivate($id); goto AUIv_; eaFSR: $this->data["csrf"] = $this->_get_csrf_nonce(); goto FOrCI; RH9sW: show_error("You must be an administrator to view this page."); goto F9IlA; P87xU: if (!($this->input->post("confirm") == "yes")) { goto Oe3aE; } goto t1xP9; FOrCI: $this->data["user"] = $this->ion_auth->user($id)->row(); goto ReaqN; t1xP9: if (!($this->_valid_csrf_nonce() === FALSE || $id != $this->input->post("id"))) { goto Bt2mM; } goto W4fGO; O4eQG: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto JAk0I; } goto RH9sW; rxuac: $this->load->library("form_validation"); goto REAoh; AUIv_: cGNfR: goto T3wn4; d5e9H: HPff6: goto eaFSR; RWyP7: if (!($this->ion_auth->logged_in() && $this->ion_auth->is_admin())) { goto cGNfR; } goto R18q7; XmDW6: $id = (int) $id; goto rxuac; cnUZt: Bt2mM: goto RWyP7; T3wn4: Oe3aE: goto Fpc0r; GDvOa: AbkXa: goto Pa1xo; c512s: goto AbkXa; goto d5e9H; Y9KnY: if ($this->form_validation->run() === FALSE) { goto HPff6; } goto P87xU; Pa1xo: } public function create_user() { goto gbmku; BHeDm: $this->form_validation->set_rules("company", $this->lang->line("create_user_validation_company_label"), "trim"); goto b9cEQ; zVqzQ: redirect("auth", "refresh"); goto Q0ays; qwLV9: $this->data["password_confirm"] = ["name" => "password_confirm", "id" => "password_confirm", "type" => "password", "value" => $this->form_validation->set_value("password_confirm")]; goto FI0H9; Ufe0Z: $identity = $identity_column === "email" ? $email : $this->input->post("identity"); goto LZmK1; w_MrR: goto H66ck; goto spaRR; YRtbD: if (!($this->form_validation->run() === TRUE)) { goto jmCX0; } goto nHZj4; b9cEQ: $this->form_validation->set_rules("password", $this->lang->line("create_user_validation_password_label"), "required|min_length[" . $this->config->item("min_password_length", "ion_auth") . "]|matches[password_confirm]"); goto OXgSE; Wcfg_: $additional_data = ["first_name" => $this->input->post("first_name"), "last_name" => $this->input->post("last_name"), "company" => $this->input->post("company"), "phone" => $this->input->post("phone")]; goto AJWhb; j1jQK: $this->form_validation->set_rules("email", $this->lang->line("create_user_validation_email_label"), "trim|required|valid_email|is_unique[" . $tables["users"] . ".email]"); goto Almft; spaRR: vdgeO: goto WR6h5; BL3jk: redirect("auth", "refresh"); goto z5axM; R4srG: if ($this->form_validation->run() === TRUE && $this->ion_auth->register($identity, $password, $email, $additional_data)) { goto vdgeO; } goto Tw3ST; CUGaJ: $this->data["email"] = ["name" => "email", "id" => "email", "type" => "text", "value" => $this->form_validation->set_value("email")]; goto RnxiW; Q0ays: dqEQd: goto FUTPA; FI0H9: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "create_user", $this->data); goto w_MrR; kc5pq: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto dqEQd; } goto zVqzQ; RnxiW: $this->data["company"] = ["name" => "company", "id" => "company", "type" => "text", "value" => $this->form_validation->set_value("company")]; goto JUdJj; Uiyt1: $this->form_validation->set_rules("last_name", $this->lang->line("create_user_validation_lname_label"), "trim|required"); goto qTE8B; LZmK1: $password = $this->input->post("password"); goto Wcfg_; ZPLLT: $this->form_validation->set_rules("phone", $this->lang->line("create_user_validation_phone_label"), "trim"); goto BHeDm; OXgSE: $this->form_validation->set_rules("password_confirm", $this->lang->line("create_user_validation_password_confirm_label"), "required"); goto YRtbD; WR6h5: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto BL3jk; gbmku: $this->data["title"] = $this->lang->line("create_user_heading"); goto kc5pq; RgMvo: $identity_column = $this->config->item("identity", "ion_auth"); goto JkbtS; z5axM: H66ck: goto WeQKW; HayhA: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password", "value" => $this->form_validation->set_value("password")]; goto qwLV9; Fdhvq: $this->form_validation->set_rules("email", $this->lang->line("create_user_validation_email_label"), "trim|required|valid_email"); goto VP11i; gVYIB: $this->form_validation->set_rules("identity", $this->lang->line("create_user_validation_identity_label"), "trim|required|is_unique[" . $tables["users"] . "." . $identity_column . "]"); goto Fdhvq; uMjkc: KBnQB: goto gVYIB; Almft: goto GJulm; goto uMjkc; JkbtS: $this->data["identity_column"] = $identity_column; goto hr92M; iTkxV: $this->data["first_name"] = ["name" => "first_name", "id" => "first_name", "type" => "text", "value" => $this->form_validation->set_value("first_name")]; goto FcjUT; FUTPA: $tables = $this->config->item("tables", "ion_auth"); goto RgMvo; nHZj4: $email = strtolower($this->input->post("email")); goto Ufe0Z; mrIoB: $this->data["identity"] = ["name" => "identity", "id" => "identity", "type" => "text", "value" => $this->form_validation->set_value("identity")]; goto CUGaJ; hr92M: $this->form_validation->set_rules("first_name", $this->lang->line("create_user_validation_fname_label"), "trim|required"); goto Uiyt1; JUdJj: $this->data["phone"] = ["name" => "phone", "id" => "phone", "type" => "text", "value" => $this->form_validation->set_value("phone")]; goto HayhA; Tw3ST: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto iTkxV; qTE8B: if ($identity_column !== "email") { goto KBnQB; } goto j1jQK; AJWhb: jmCX0: goto R4srG; VP11i: GJulm: goto ZPLLT; FcjUT: $this->data["last_name"] = ["name" => "last_name", "id" => "last_name", "type" => "text", "value" => $this->form_validation->set_value("last_name")]; goto mrIoB; WeQKW: } public function redirectUser() { goto VW61Y; VW61Y: if (!$this->ion_auth->is_admin()) { goto edK_3; } goto drbS8; athJ0: edK_3: goto TNnbo; drbS8: redirect("auth", "refresh"); goto athJ0; TNnbo: redirect("/", "refresh"); goto fhyZL; fhyZL: } public function edit_user($id) { goto Qrmmy; rItGk: goto X1t7v; goto VmhQQ; AcSSr: $this->data["groups"] = $groups; goto kVPLt; tq5Db: $currentGroups = $this->ion_auth->get_users_groups($id)->result(); goto cL_UN; u_UQQ: redirect("auth", "refresh"); goto OQ0Sx; fzKUr: awNLm: goto CMiU3; Ans3i: QMLui: goto RGnFC; LmwK0: $this->data["last_name"] = ["name" => "last_name", "id" => "last_name", "type" => "text", "value" => $this->form_validation->set_value("last_name", $user->last_name)]; goto h7oTj; EOvYk: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto JS3I0; YIz2b: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password"]; goto ZxcaS; Y5HBY: $this->form_validation->set_rules("password_confirm", $this->lang->line("edit_user_validation_password_confirm_label"), "required"); goto Oa5Rv; OQ0Sx: NGgho: goto it8XZ; Oa5Rv: Mulo7: goto ba19z; ru9u9: GQL4x: goto lgmGk; RGnFC: if (!$this->ion_auth->is_admin()) { goto GQL4x; } goto s1iTZ; ZxcaS: $this->data["password_confirm"] = ["name" => "password_confirm", "id" => "password_confirm", "type" => "password"]; goto vqHR4; wQcv1: $this->form_validation->set_rules("last_name", $this->lang->line("edit_user_validation_lname_label"), "trim|required"); goto xhgb2; IGXNf: if (!$this->input->post("password")) { goto QMLui; } goto H3BW6; j02dB: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto zLMOJ; NH59r: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin() && !($this->ion_auth->user()->row()->id == $id))) { goto NGgho; } goto u_UQQ; bpW1N: $this->data["user"] = $user; goto AcSSr; lgmGk: if ($this->ion_auth->update($user->id, $data)) { goto JKmtq; } goto j02dB; AugZM: UWxqZ: goto s_ppu; xhgb2: $this->form_validation->set_rules("phone", $this->lang->line("edit_user_validation_phone_label"), "trim"); goto a7nWY; s1iTZ: $this->ion_auth->remove_from_group('', $id); goto g0hH1; VmhQQ: JKmtq: goto EOvYk; it8XZ: $user = $this->ion_auth->user($id)->row(); goto DbjJr; DbjJr: $groups = $this->ion_auth->groups()->result_array(); goto tq5Db; CMiU3: oApQ6: goto SxhrS; Tdxvd: VcdTU: goto ru9u9; PCAOx: $this->data["first_name"] = ["name" => "first_name", "id" => "first_name", "type" => "text", "value" => $this->form_validation->set_value("first_name", $user->first_name)]; goto LmwK0; W0QeJ: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto bpW1N; BuRBS: Jy_BT: goto Tdxvd; f1Lu4: X1t7v: goto fzKUr; daEd7: if (!($this->_valid_csrf_nonce() === FALSE || $id != $this->input->post("id"))) { goto UWxqZ; } goto F3SkJ; cL_UN: $this->form_validation->set_rules("first_name", $this->lang->line("edit_user_validation_fname_label"), "trim|required"); goto wQcv1; tB0yq: $this->data["phone"] = ["name" => "phone", "id" => "phone", "type" => "text", "value" => $this->form_validation->set_value("phone", $user->phone)]; goto YIz2b; cOCgw: $this->form_validation->set_rules("password", $this->lang->line("edit_user_validation_password_label"), "required|min_length[" . $this->config->item("min_password_length", "ion_auth") . "]|matches[password_confirm]"); goto Y5HBY; v0que: $data = ["first_name" => $this->input->post("first_name"), "last_name" => $this->input->post("last_name"), "company" => $this->input->post("company"), "phone" => $this->input->post("phone")]; goto IGXNf; kVPLt: $this->data["currentGroups"] = $currentGroups; goto PCAOx; h7oTj: $this->data["company"] = ["name" => "company", "id" => "company", "type" => "text", "value" => $this->form_validation->set_value("company", $user->company)]; goto tB0yq; s_ppu: if (!$this->input->post("password")) { goto Mulo7; } goto cOCgw; H3BW6: $data["password"] = $this->input->post("password"); goto Ans3i; ba19z: if (!($this->form_validation->run() === TRUE)) { goto awNLm; } goto v0que; g0hH1: $groupData = $this->input->post("groups"); goto YwVTh; JS3I0: $this->redirectUser(); goto f1Lu4; SxhrS: $this->data["csrf"] = $this->_get_csrf_nonce(); goto W0QeJ; F3SkJ: show_error($this->lang->line("error_csrf")); goto AugZM; Qrmmy: $this->data["title"] = $this->lang->line("edit_user_heading"); goto NH59r; vqHR4: $this->_render_page("auth/edit_user", $this->data); goto p1chS; zLMOJ: $this->redirectUser(); goto rItGk; YwVTh: if (!(isset($groupData) && !empty($groupData))) { goto VcdTU; } goto I4efk; I4efk: foreach ($groupData as $grp) { $this->ion_auth->add_to_group($grp, $id); v3448: } goto BuRBS; a7nWY: $this->form_validation->set_rules("company", $this->lang->line("edit_user_validation_company_label"), "trim"); goto qJYUA; qJYUA: if (!(isset($_POST) && !empty($_POST))) { goto oApQ6; } goto daEd7; p1chS: } public function create_group() { goto vyPMd; VRC78: $this->form_validation->set_rules("group_name", $this->lang->line("create_group_validation_name_label"), "trim|required|alpha_dash"); goto cdXCe; f9blK: CSVz0: goto DpSg5; cdXCe: if (!($this->form_validation->run() === TRUE)) { goto VmVFf; } goto NbUVX; MpIRb: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto P5uCJ; AuKdu: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto bqryO; } goto TKZHz; tZGmT: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto BBl0_; BBl0_: $this->data["group_name"] = ["name" => "group_name", "id" => "group_name", "type" => "text", "value" => $this->form_validation->set_value("group_name")]; goto rc7ln; NbUVX: $new_group_id = $this->ion_auth->create_group($this->input->post("group_name"), $this->input->post("description")); goto pXAxx; vyPMd: $this->data["title"] = $this->lang->line("create_group_title"); goto AuKdu; TKZHz: redirect("auth", "refresh"); goto kv_bF; SUsBH: redirect("auth", "refresh"); goto X78k6; uJ__z: $this->_render_page("auth/create_group", $this->data); goto HLZsW; P5uCJ: goto ldGE1; goto f9blK; DpSg5: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto SUsBH; pXAxx: if ($new_group_id) { goto CSVz0; } goto MpIRb; X78k6: ldGE1: goto RnPH6; kv_bF: bqryO: goto VRC78; rc7ln: $this->data["description"] = ["name" => "description", "id" => "description", "type" => "text", "value" => $this->form_validation->set_value("description")]; goto uJ__z; RnPH6: VmVFf: goto tZGmT; HLZsW: } public function edit_group($id) { goto vFq4e; zWRYg: if (!($this->config->item("admin_group", "ion_auth") === $group->name)) { goto VZl_x; } goto w4GLr; YNPAO: $group_update = $this->ion_auth->update_group($id, $_POST["group_name"], array("description" => $_POST["group_description"])); goto XAtcs; mGXvc: $this->data["group"] = $group; goto NTAP9; YS4eR: goto zNv4Z; goto LcQfL; NNQFW: redirect("auth", "refresh"); goto E8qX_; xfy1X: gXLDA: goto WWWpl; U1KTs: if (!(isset($_POST) && !empty($_POST))) { goto jPaZZ; } goto EWG36; w4GLr: $this->data["group_name"]["readonly"] = "readonly"; goto jmdHH; XAtcs: if ($group_update) { goto bVT9n; } goto Dz12H; kTeDA: zNv4Z: goto xfy1X; LcQfL: bVT9n: goto kjdT4; NTAP9: $this->data["group_name"] = ["name" => "group_name", "id" => "group_name", "type" => "text", "value" => $this->form_validation->set_value("group_name", $group->name)]; goto zWRYg; dNUEV: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "edit_group", $this->data); goto gXzco; lMJHh: redirect("auth", "refresh"); goto kTeDA; jmdHH: VZl_x: goto MZFF3; Dz12H: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto YS4eR; Flc_3: xNDRd: goto qeiDf; vFq4e: if (!(!$id || empty($id))) { goto xNDRd; } goto jjnW3; EWG36: if (!($this->form_validation->run() === TRUE)) { goto gXLDA; } goto YNPAO; uaTjq: $group = $this->ion_auth->group($id)->row(); goto ZwMZI; WWWpl: jPaZZ: goto MS5g3; E8qX_: BNmWe: goto uaTjq; jjnW3: redirect("auth", "refresh"); goto Flc_3; MS5g3: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto mGXvc; ZwMZI: $this->form_validation->set_rules("group_name", $this->lang->line("edit_group_validation_name_label"), "trim|required|alpha_dash"); goto U1KTs; MZFF3: $this->data["group_description"] = ["name" => "group_description", "id" => "group_description", "type" => "text", "value" => $this->form_validation->set_value("group_description", $group->description)]; goto dNUEV; iDERS: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto BNmWe; } goto NNQFW; kjdT4: $this->session->set_flashdata("message", $this->lang->line("edit_group_saved")); goto lMJHh; qeiDf: $this->data["title"] = $this->lang->line("edit_group_title"); goto iDERS; gXzco: } public function _get_csrf_nonce() { goto kcXAy; G6wUn: $this->session->set_flashdata("csrfkey", $key); goto btUe_; kcXAy: $this->load->helper("string"); goto kybzC; btUe_: $this->session->set_flashdata("csrfvalue", $value); goto rAGIo; rAGIo: return [$key => $value]; goto Ke5Cb; kybzC: $key = random_string("alnum", 8); goto HZAhH; HZAhH: $value = random_string("alnum", 20); goto G6wUn; Ke5Cb: } public function _valid_csrf_nonce() { goto ltkvJ; PVk4G: return FALSE; goto TdBak; jfA9M: AX2g7: goto PVk4G; ltkvJ: $csrfkey = $this->input->post($this->session->flashdata("csrfkey")); goto jAEmT; pikY9: return TRUE; goto jfA9M; jAEmT: if (!($csrfkey && $csrfkey === $this->session->flashdata("csrfvalue"))) { goto AX2g7; } goto pikY9; TdBak: } public function _render_page($view, $data = NULL, $returnhtml = FALSE) { goto LhQTa; cnzlv: lrIo1: goto iPaCt; TvHU0: return $view_html; goto cnzlv; LhQTa: $viewdata = empty($data) ? $this->data : $data; goto CgEQV; NjeIx: if (!$returnhtml) { goto lrIo1; } goto TvHU0; CgEQV: $view_html = $this->load->view($view, $viewdata, $returnhtml); goto NjeIx; iPaCt: } } ?>