Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php defined("BASEPATH") or exit("No direct script access allowed"); class Auth ext..
Decoded Output download
<?php
defined("BASEPATH") or exit("No direct script access allowed"); class Auth extends CI_Controller { public $data = array(); public function __construct() { goto rCtXY; sFJGb: $this->lang->load("auth"); goto ol7HA; AxdHb: $this->load->database(); goto mGUdR; mGUdR: $this->load->library("form_validation"); goto VFXL7; UyZpZ: $this->form_validation->set_error_delimiters($this->config->item("error_start_delimiter", "ion_auth"), $this->config->item("error_end_delimiter", "ion_auth")); goto sFJGb; VFXL7: $this->load->helper(["url", "language"]); goto UyZpZ; rCtXY: parent::__construct(); goto AxdHb; ol7HA: } public function output_json($data) { $this->output->set_content_type("application/json")->set_output(json_encode($data)); } public function index() { goto F_6nK; x9ymK: if (!$this->ion_auth->logged_in()) { goto NU2EE; } goto aOfNB; l03ae: $group = $this->ion_auth->get_users_groups($user_id)->row()->name; goto Z8UkN; BFmM1: $this->load->view("_templates/auth/_footer"); goto SNQh0; aOfNB: $user_id = $this->ion_auth->user()->row()->id; goto l03ae; wdgx0: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password", "placeholder" => "Password", "class" => "form-control"]; goto Uue3j; NpMpV: $this->data["identity"] = ["name" => "identity", "id" => "identity", "type" => "text", "placeholder" => "Username", "autofocus" => "autofocus", "class" => "form-control", "autocomplete" => "off"]; goto wdgx0; oMU0z: $this->load->view("_templates/auth/_header", $this->data); goto JXo02; JXo02: $this->load->view("auth/login"); goto BFmM1; oYgYE: if (!(count($this->db->list_tables()) == 0)) { goto nl8br; } goto FkMko; qq04m: $setting = $this->settings->getSetting(); goto bb0EA; bb0EA: if (!($setting == null)) { goto O1PM3; } goto WkBbm; FkMko: redirect("install"); goto jWxLm; WkBbm: redirect("install"); goto BNVsG; QbAot: NU2EE: goto sHx5O; sHx5O: $this->data["setting"] = $setting; goto NpMpV; jWxLm: nl8br: goto qq04m; BNVsG: O1PM3: goto x9ymK; F_6nK: $this->load->model("Settings_model", "settings"); goto oYgYE; Uue3j: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto oMU0z; Z8UkN: redirect("dashboard"); goto QbAot; SNQh0: } public function cek_login() { goto vxShw; JBzz7: eELDJ: goto v7ZAJ; OfjmC: lGhtC: goto w7F1I; mnKh1: goto sdmnd; goto OfjmC; xJaZZ: oF5DQ: goto Rc20m; Rc20m: $remember = (bool) $this->input->post("remember"); goto NoJyu; it1IG: if ($this->ion_auth->is_max_login_attempts_exceeded($this->input->post("identity"))) { goto lGhtC; } goto TwUDA; sUttE: $invalid = ["identity" => form_error("identity"), "password" => form_error("password")]; goto Qww7a; hyXes: if ($this->form_validation->run() === TRUE) { goto oF5DQ; } goto sUttE; my5Qw: $this->form_validation->set_rules("password", str_replace(":", '', $this->lang->line("login_password_label")), "required|trim"); goto hyXes; vxShw: $this->form_validation->set_rules("identity", str_replace(":", '', $this->lang->line("login_identity_label")), "required|trim"); goto my5Qw; oooYP: goto eELDJ; goto C5zaH; wjsCd: $this->cek_akses(); goto JBzz7; w7F1I: $data = ["status" => false, "failed" => "Anda sudah 3x melakukan percobaan login, silakan hubungi Administrator", "akses" => "attempts"]; goto vGeXp; NoJyu: if ($this->ion_auth->login($this->input->post("identity"), $this->input->post("password"), $remember)) { goto dj3zt; } goto it1IG; qjpCd: $this->output_json($data); goto oooYP; TwUDA: $data = ["status" => false, "failed" => "Incorrect Login", "akses" => "no attempts"]; goto mnKh1; Qww7a: $data = ["status" => false, "invalid" => $invalid, "akses" => "no valid"]; goto xVvzj; C5zaH: dj3zt: goto wjsCd; v7ZAJ: P2tb1: goto N6Wi3; L7vth: goto P2tb1; goto xJaZZ; vGeXp: sdmnd: goto qjpCd; xVvzj: $this->output_json($data); goto L7vth; N6Wi3: } public function cek_akses() { goto yjnvz; rTzCo: $status = false; goto VvwLd; gZFIj: $status = true; goto aSlVA; aSlVA: $this->load->model("Log_model", "logging"); goto CauM8; dIVuI: joYup: goto rTzCo; Zfamv: $this->output_json($data); goto qD_Fe; QP1Z2: $url = "dashboard"; goto gRWbi; VvwLd: $url = "auth"; goto bqB08; bqB08: bBsT7: goto H1bZM; CauM8: $this->logging->saveLog(1, "Login"); goto QP1Z2; H1bZM: $data = ["status" => $status, "url" => $url]; goto Zfamv; yjnvz: if (!$this->ion_auth->logged_in()) { goto joYup; } goto gZFIj; gRWbi: goto bBsT7; goto dIVuI; qD_Fe: } public function logout() { $this->ion_auth->logout(); redirect("login", "refresh"); } public function change_password() { goto oCZio; ODxnX: cJg2F: goto gQ4wN; l0VFi: $this->data["user_id"] = ["name" => "user_id", "id" => "user_id", "type" => "hidden", "value" => $user->id]; goto PEK08; sFvnv: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto V3Ap2; aeYtg: $identity = $this->session->userdata("identity"); goto GkicT; LdTv2: if ($change) { goto O526b; } goto Yl2tk; roW0s: $this->data["new_password"] = ["name" => "new", "id" => "new", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto nggSI; q4ICz: if ($this->ion_auth->logged_in()) { goto oCzo5; } goto I_yCj; F8Prr: goto cJg2F; goto bd_dm; OXh2l: oCzo5: goto VqiJD; NEmsT: redirect("auth/change_password", "refresh"); goto F8Prr; V3Ap2: $this->data["min_password_length"] = $this->config->item("min_password_length", "ion_auth"); goto wMfHp; ZAh8M: $this->logout(); goto ODxnX; wv4PA: znZVk: goto sFvnv; Yl2tk: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto NEmsT; oCZio: $this->form_validation->set_rules("old", $this->lang->line("change_password_validation_old_password_label"), "required"); goto kaRR7; l5rAk: A3Vax: goto TXxOp; sCmS3: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto ZAh8M; VqiJD: $user = $this->ion_auth->user()->row(); goto e15hx; gQ4wN: goto A3Vax; goto wv4PA; l20b3: $this->form_validation->set_rules("new_confirm", $this->lang->line("change_password_validation_new_password_confirm_label"), "required"); goto q4ICz; wMfHp: $this->data["old_password"] = ["name" => "old", "id" => "old", "type" => "password"]; goto roW0s; bd_dm: O526b: goto sCmS3; e15hx: if ($this->form_validation->run() === FALSE) { goto znZVk; } goto aeYtg; GkicT: $change = $this->ion_auth->change_password($identity, $this->input->post("old"), $this->input->post("new")); goto LdTv2; kaRR7: $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 l20b3; nggSI: $this->data["new_password_confirm"] = ["name" => "new_confirm", "id" => "new_confirm", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto l0VFi; I_yCj: redirect("auth/login", "refresh"); goto OXh2l; PEK08: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "change_password", $this->data); goto l5rAk; TXxOp: } public function forgot_password() { goto Pb4vd; j7SnJ: z6o31: goto xfZHN; ZWgn0: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto NWbgj; fupdK: if (!empty($identity)) { goto UZ9yt; } goto k2JbU; Afmm5: redirect("auth/forgot_password", "refresh"); goto eXrp2; r8q62: $this->data["identity"] = ["name" => "identity", "id" => "identity", "class" => "form-control", "autocomplete" => "off", "autofocus" => "autofocus"]; goto PcWK7; evYUt: $this->form_validation->set_rules("identity", $this->lang->line("forgot_password_identity_label"), "required"); goto ssaAt; dLOZy: $this->form_validation->set_rules("identity", $this->lang->line("forgot_password_validation_email_label"), "required|valid_email"); goto nYWzE; YL8hj: $identity_column = $this->config->item("identity", "ion_auth"); goto KIzc8; mbQoI: goto rMwIj; goto j7SnJ; t1VxA: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto Q1hML; E3y31: if ($this->config->item("identity", "ion_auth") != "email") { goto MYyrU; } goto dLOZy; xdVFy: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto ClJDH; G09kV: $forgotten = $this->ion_auth->forgotten_password($identity->{$this->config->item("identity", "ion_auth")}); goto CCoMy; ClJDH: redirect("auth/forgot_password", "refresh"); goto x7emi; eXrp2: IheL_: goto GIIpJ; KIzc8: $identity = $this->ion_auth->where($identity_column, $this->input->post("identity"))->users()->row(); goto fupdK; rLv1H: $this->data["type"] = $this->config->item("identity", "ion_auth"); goto r8q62; h64DH: W8Uoa: goto rYCoR; gjKgE: if ($this->form_validation->run() === FALSE) { goto Iku4J; } goto YL8hj; mhxaU: G7Xj9: goto kVUA2; b30KW: rMwIj: goto ZWgn0; DhCg7: $this->ion_auth->set_error("forgot_password_email_not_found"); goto mbQoI; ZGCdr: $this->data["identity_label"] = $this->lang->line("forgot_password_email_identity_label"); goto Qd5V1; GIIpJ: goto caILU; goto ekf3z; o7QCw: caILU: goto beZ51; x7emi: goto IheL_; goto mhxaU; NWbgj: redirect("auth/forgot_password", "refresh"); goto kWn1l; VoGAj: MYyrU: goto evYUt; xfZHN: $this->ion_auth->set_error("forgot_password_identity_not_found"); goto b30KW; Q1hML: $this->load->view("_templates/auth/_header", $this->data); goto qerQp; Qd5V1: goto F9v7p; goto h64DH; PcWK7: if ($this->config->item("identity", "ion_auth") != "email") { goto W8Uoa; } goto ZGCdr; nYWzE: goto O5GyO; goto VoGAj; k2JbU: if ($this->config->item("identity", "ion_auth") != "email") { goto z6o31; } goto DhCg7; qerQp: $this->load->view("auth/forgot_password"); goto aaH1P; ssaAt: O5GyO: goto gjKgE; aaH1P: $this->load->view("_templates/auth/_footer"); goto o7QCw; ekf3z: Iku4J: goto rLv1H; kWn1l: UZ9yt: goto G09kV; kVUA2: $this->session->set_flashdata("success", $this->ion_auth->messages()); goto Afmm5; cDI4y: F9v7p: goto t1VxA; rYCoR: $this->data["identity_label"] = $this->lang->line("forgot_password_identity_label"); goto cDI4y; Pb4vd: $this->data["title"] = $this->lang->line("forgot_password_heading"); goto E3y31; CCoMy: if ($forgotten) { goto G7Xj9; } goto xdVFy; beZ51: } public function reset_password($code = NULL) { goto FojOi; VNmaL: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto YnDi2; tHCrm: $this->data["user_id"] = ["name" => "user_id", "id" => "user_id", "type" => "hidden", "value" => $user->id]; goto RJXL0; eAGH5: $this->data["min_password_length"] = $this->config->item("min_password_length", "ion_auth"); goto AODKX; N2wip: $user = $this->ion_auth->forgotten_password_check($code); goto xl3vi; AODKX: $this->data["new_password"] = ["name" => "new", "id" => "new", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto eLIE5; iocvP: LrFaj: goto jP9es; A0jAs: $this->ion_auth->clear_forgotten_password_code($identity); goto gcYy2; tnIzk: $this->load->view("_templates/auth/_footer"); goto Se_vZ; DWT0T: vxrbc: goto BWi1B; CQ8hP: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto HlmPT; OOJFT: if ($this->form_validation->run() === FALSE) { goto LrFaj; } goto spFEa; BuohF: oSt5X: goto Eb5xN; spFEa: $identity = $user->{$this->config->item("identity", "ion_auth")}; goto v8VD3; sVarP: HIW1T: goto OEqWp; jH8GO: Kbaaf: goto A0jAs; v8VD3: if ($this->_valid_csrf_nonce() === FALSE || $user->id != $this->input->post("user_id")) { goto Kbaaf; } goto biU_4; LBU1N: UBZQR: goto VNmaL; OEqWp: $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 yA03w; pAVWR: $this->data["code"] = $code; goto GKPTq; gcYy2: show_error($this->lang->line("error_csrf")); goto DWT0T; BWi1B: goto lHOII; goto iocvP; GKPTq: $this->load->view("_templates/auth/_header"); goto rr3qi; o4Z2V: if ($change) { goto UBZQR; } goto CQ8hP; FojOi: if ($code) { goto oSt5X; } goto g6iLP; HlmPT: redirect("auth/reset_password/" . $code, "refresh"); goto g0Z9n; AqBub: JYsOv: goto s45nc; biU_4: $change = $this->ion_auth->reset_password($identity, $this->input->post("new")); goto o4Z2V; jP9es: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto eAGH5; g6iLP: show_404(); goto BuohF; eLIE5: $this->data["new_password_confirm"] = ["name" => "new_confirm", "id" => "new_confirm", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto tHCrm; vr1Fj: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto vd0AA; Eb5xN: $this->data["title"] = $this->lang->line("reset_password_heading"); goto N2wip; rr3qi: $this->load->view("auth/reset_password", $this->data); goto tnIzk; vd0AA: redirect("auth/forgot_password", "refresh"); goto V1_SM; s45nc: goto vxrbc; goto jH8GO; g0Z9n: goto JYsOv; goto LBU1N; RJXL0: $this->data["csrf"] = $this->_get_csrf_nonce(); goto pAVWR; PXjue: nqZiY: goto pnVQR; xl3vi: if ($user) { goto HIW1T; } goto vr1Fj; yA03w: $this->form_validation->set_rules("new_confirm", $this->lang->line("reset_password_validation_new_password_confirm_label"), "required"); goto OOJFT; V1_SM: goto nqZiY; goto sVarP; Se_vZ: lHOII: goto PXjue; YnDi2: redirect("auth/login", "refresh"); goto AqBub; pnVQR: } public function activate($id, $code = FALSE) { goto LAeQ0; tHx0B: $activation = $this->ion_auth->activate($id, $code); goto v8imv; HmbR6: if ($activation) { goto wA5Hs; } goto lYiLt; J5xkJ: $activation = $this->ion_auth->activate($id); goto RfBrk; EV84N: if ($code !== FALSE) { goto Y3fqk; } goto imDSd; W1IKi: Y3fqk: goto tHx0B; E0TXS: redirect("auth", "refresh"); goto NAnTM; imDSd: if (!$this->ion_auth->is_admin()) { goto wDD1m; } goto J5xkJ; TSldl: redirect("auth/forgot_password", "refresh"); goto qZOf0; YL8PU: wA5Hs: goto EhNtH; lYiLt: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto TSldl; EhNtH: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto E0TXS; v8imv: Br0mL: goto HmbR6; xXhWt: goto Br0mL; goto W1IKi; qZOf0: goto pwPbV; goto YL8PU; RfBrk: wDD1m: goto xXhWt; NAnTM: pwPbV: goto XD0Gk; LAeQ0: $activation = FALSE; goto EV84N; XD0Gk: } public function deactivate($id = NULL) { goto mf08r; n8M0a: if ($this->form_validation->run() === FALSE) { goto p133D; } goto TlyLq; jv3bU: $this->data["user"] = $this->ion_auth->user($id)->row(); goto UaHr3; xttNL: ZY2E7: goto GnG_Q; YQQCL: goto m1OOh; goto gcKja; fLw9U: $this->form_validation->set_rules("confirm", $this->lang->line("deactivate_validation_confirm_label"), "required"); goto dygdk; wAGuP: if (!($this->ion_auth->logged_in() && $this->ion_auth->is_admin())) { goto y7_5K; } goto b4U5s; kPZ81: $this->load->library("form_validation"); goto fLw9U; ncZju: KMULA: goto jkrL6; jkrL6: redirect("auth", "refresh"); goto YQQCL; mJ9xX: $this->data["csrf"] = $this->_get_csrf_nonce(); goto jv3bU; jLkYU: m1OOh: goto nP3AM; dygdk: $this->form_validation->set_rules("id", $this->lang->line("deactivate_validation_user_id_label"), "required|alpha_numeric"); goto n8M0a; jWXOg: i3k9G: goto wAGuP; b4U5s: $this->ion_auth->deactivate($id); goto uYnzv; TlyLq: if (!($this->input->post("confirm") == "yes")) { goto KMULA; } goto p2Avs; UaHr3: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "deactivate_user", $this->data); goto jLkYU; gcKja: p133D: goto mJ9xX; mf08r: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto ZY2E7; } goto mbr7a; p2Avs: if (!($this->_valid_csrf_nonce() === FALSE || $id != $this->input->post("id"))) { goto i3k9G; } goto BixDh; BixDh: show_error($this->lang->line("error_csrf")); goto jWXOg; mbr7a: show_error("You must be an administrator to view this page."); goto xttNL; uYnzv: y7_5K: goto ncZju; GnG_Q: $id = (int) $id; goto kPZ81; nP3AM: } public function create_user() { goto codxK; GZXNZ: goto YxsZ9; goto S51pL; qYNun: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password", "value" => $this->form_validation->set_value("password")]; goto z_Imh; hNhAO: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto Lsod4; paYTC: $this->data["email"] = ["name" => "email", "id" => "email", "type" => "text", "value" => $this->form_validation->set_value("email")]; goto XlQjJ; lHGjh: $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 j7t4t; F9luG: IGEPd: goto WiWAH; DbyvO: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto wmYly; WiWAH: if ($this->form_validation->run() === TRUE && $this->ion_auth->register($identity, $password, $email, $additional_data)) { goto Cb68l; } goto hNhAO; FmHth: if ($identity_column !== "email") { goto iAui3; } goto UPoGQ; PA7E4: goto ZUPY3; goto jnEtB; fcKzw: $this->data["identity_column"] = $identity_column; goto zPXlw; RizJx: ZUPY3: goto Dc0xp; z_Imh: $this->data["password_confirm"] = ["name" => "password_confirm", "id" => "password_confirm", "type" => "password", "value" => $this->form_validation->set_value("password_confirm")]; goto fBBMs; vAs94: $tables = $this->config->item("tables", "ion_auth"); goto OebMa; ftsZp: $this->form_validation->set_rules("identity", $this->lang->line("create_user_validation_identity_label"), "trim|required|is_unique[" . $tables["users"] . "." . $identity_column . "]"); goto mGIIf; JK8vV: $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 F9luG; zPXlw: $this->form_validation->set_rules("first_name", $this->lang->line("create_user_validation_fname_label"), "trim|required"); goto E2Sgr; NHFi0: Rog18: goto vAs94; btFIO: $identity = $identity_column === "email" ? $email : $this->input->post("identity"); goto AnZzh; vdW_D: $this->data["phone"] = ["name" => "phone", "id" => "phone", "type" => "text", "value" => $this->form_validation->set_value("phone")]; goto qYNun; itqwA: $this->data["identity"] = ["name" => "identity", "id" => "identity", "type" => "text", "value" => $this->form_validation->set_value("identity")]; goto paYTC; mGIIf: $this->form_validation->set_rules("email", $this->lang->line("create_user_validation_email_label"), "trim|required|valid_email"); goto DPeJu; Lsod4: $this->data["first_name"] = ["name" => "first_name", "id" => "first_name", "type" => "text", "value" => $this->form_validation->set_value("first_name")]; goto OBMdK; PbFLi: if (!($this->form_validation->run() === TRUE)) { goto IGEPd; } goto jaWQG; DPeJu: YxsZ9: goto X_D0m; jaWQG: $email = strtolower($this->input->post("email")); goto btFIO; jnEtB: Cb68l: goto DbyvO; UPoGQ: $this->form_validation->set_rules("email", $this->lang->line("create_user_validation_email_label"), "trim|required|valid_email|is_unique[" . $tables["users"] . ".email]"); goto GZXNZ; QA25y: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto Rog18; } goto x7YYt; XlQjJ: $this->data["company"] = ["name" => "company", "id" => "company", "type" => "text", "value" => $this->form_validation->set_value("company")]; goto vdW_D; x7YYt: redirect("auth", "refresh"); goto NHFi0; j7t4t: $this->form_validation->set_rules("password_confirm", $this->lang->line("create_user_validation_password_confirm_label"), "required"); goto PbFLi; OBMdK: $this->data["last_name"] = ["name" => "last_name", "id" => "last_name", "type" => "text", "value" => $this->form_validation->set_value("last_name")]; goto itqwA; S51pL: iAui3: goto ftsZp; E2Sgr: $this->form_validation->set_rules("last_name", $this->lang->line("create_user_validation_lname_label"), "trim|required"); goto FmHth; OebMa: $identity_column = $this->config->item("identity", "ion_auth"); goto fcKzw; wmYly: redirect("auth", "refresh"); goto RizJx; AnZzh: $password = $this->input->post("password"); goto JK8vV; codxK: $this->data["title"] = $this->lang->line("create_user_heading"); goto QA25y; ZVgMu: $this->form_validation->set_rules("company", $this->lang->line("create_user_validation_company_label"), "trim"); goto lHGjh; fBBMs: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "create_user", $this->data); goto PA7E4; X_D0m: $this->form_validation->set_rules("phone", $this->lang->line("create_user_validation_phone_label"), "trim"); goto ZVgMu; Dc0xp: } public function redirectUser() { goto zkgph; VdY1f: redirect("auth", "refresh"); goto MPBRs; MPBRs: q1ee5: goto QHYTp; QHYTp: redirect("/", "refresh"); goto jpOjC; zkgph: if (!$this->ion_auth->is_admin()) { goto q1ee5; } goto VdY1f; jpOjC: } public function edit_user($id) { goto JP61w; Hu_ay: jued3: goto klZwE; x7pYs: $this->form_validation->set_rules("company", $this->lang->line("edit_user_validation_company_label"), "trim"); goto cu2MR; pDO_K: G4NeS: goto eYiXP; FSgwq: if ($this->ion_auth->update($user->id, $data)) { goto XrO53; } goto umzC4; zC0Oo: $this->_render_page("auth/edit_user", $this->data); goto UvCj0; nhLQj: $this->form_validation->set_rules("password_confirm", $this->lang->line("edit_user_validation_password_confirm_label"), "required"); goto HYnpZ; Ww2Pr: $this->data["password_confirm"] = ["name" => "password_confirm", "id" => "password_confirm", "type" => "password"]; goto zC0Oo; qSqVh: $data["password"] = $this->input->post("password"); goto D4OC9; vT2sE: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto wBSOB; umzC4: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto qzWF5; Bn7Ym: $this->data["first_name"] = ["name" => "first_name", "id" => "first_name", "type" => "text", "value" => $this->form_validation->set_value("first_name", $user->first_name)]; goto SU2Fb; D4OC9: cxDLR: goto GBIq7; PuPnf: $this->form_validation->set_rules("phone", $this->lang->line("edit_user_validation_phone_label"), "trim"); goto x7pYs; rO_W_: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin() && !($this->ion_auth->user()->row()->id == $id))) { goto AgTXn; } goto CMPej; hTafQ: if (!$this->input->post("password")) { goto cxDLR; } goto qSqVh; gp3ps: xSWMn: goto FSgwq; eYiXP: LPQHi: goto gp3ps; wBSOB: $this->data["user"] = $user; goto cubGn; GBIq7: if (!$this->ion_auth->is_admin()) { goto xSWMn; } goto mlVR0; OiJXZ: $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 nhLQj; OotOY: $currentGroups = $this->ion_auth->get_users_groups($id)->result(); goto rdqR8; penJ4: if (!(isset($groupData) && !empty($groupData))) { goto LPQHi; } goto s83nU; s83nU: foreach ($groupData as $grp) { $this->ion_auth->add_to_group($grp, $id); RqKJG: } goto pDO_K; Zn6SW: $groupData = $this->input->post("groups"); goto penJ4; ISfMP: goto Br6fh; goto vr5u7; cubGn: $this->data["groups"] = $groups; goto mfeDI; Fxo8_: $this->data["csrf"] = $this->_get_csrf_nonce(); goto vT2sE; SU2Fb: $this->data["last_name"] = ["name" => "last_name", "id" => "last_name", "type" => "text", "value" => $this->form_validation->set_value("last_name", $user->last_name)]; goto NMOo0; i_qV_: aeu_X: goto Fxo8_; lWxA0: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto f1I0y; vr5u7: XrO53: goto lWxA0; Sprlx: $this->form_validation->set_rules("last_name", $this->lang->line("edit_user_validation_lname_label"), "trim|required"); goto PuPnf; kgBX8: show_error($this->lang->line("error_csrf")); goto Hu_ay; t3l5W: $this->data["phone"] = ["name" => "phone", "id" => "phone", "type" => "text", "value" => $this->form_validation->set_value("phone", $user->phone)]; goto F9jlW; JP61w: $this->data["title"] = $this->lang->line("edit_user_heading"); goto rO_W_; HYnpZ: dNPZd: goto krGaM; f1I0y: $this->redirectUser(); goto D6AHW; cu2MR: if (!(isset($_POST) && !empty($_POST))) { goto aeu_X; } goto RQrjx; qzWF5: $this->redirectUser(); goto ISfMP; Mgcd2: $user = $this->ion_auth->user($id)->row(); goto zLBIc; Lum1h: AgTXn: goto Mgcd2; RQrjx: if (!($this->_valid_csrf_nonce() === FALSE || $id != $this->input->post("id"))) { goto jued3; } goto kgBX8; krGaM: if (!($this->form_validation->run() === TRUE)) { goto mqv23; } goto fl65m; D6AHW: Br6fh: goto PfbzT; zLBIc: $groups = $this->ion_auth->groups()->result_array(); goto OotOY; NMOo0: $this->data["company"] = ["name" => "company", "id" => "company", "type" => "text", "value" => $this->form_validation->set_value("company", $user->company)]; goto t3l5W; fl65m: $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 hTafQ; klZwE: if (!$this->input->post("password")) { goto dNPZd; } goto OiJXZ; mfeDI: $this->data["currentGroups"] = $currentGroups; goto Bn7Ym; F9jlW: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password"]; goto Ww2Pr; rdqR8: $this->form_validation->set_rules("first_name", $this->lang->line("edit_user_validation_fname_label"), "trim|required"); goto Sprlx; mlVR0: $this->ion_auth->remove_from_group('', $id); goto Zn6SW; CMPej: redirect("auth", "refresh"); goto Lum1h; PfbzT: mqv23: goto i_qV_; UvCj0: } public function create_group() { goto rSMZY; KCkx6: goto GeiRS; goto kzMa3; FSQJZ: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto rhcph; rSMZY: $this->data["title"] = $this->lang->line("create_group_title"); goto ulpP1; DBm7o: $new_group_id = $this->ion_auth->create_group($this->input->post("group_name"), $this->input->post("description")); goto wvnmO; OvXml: redirect("auth", "refresh"); goto FqNm6; Gy28z: redirect("auth", "refresh"); goto bDTSu; LfOit: if (!($this->form_validation->run() === TRUE)) { goto ovUb1; } goto DBm7o; H_gyv: $this->data["description"] = ["name" => "description", "id" => "description", "type" => "text", "value" => $this->form_validation->set_value("description")]; goto yHlAD; rhcph: $this->data["group_name"] = ["name" => "group_name", "id" => "group_name", "type" => "text", "value" => $this->form_validation->set_value("group_name")]; goto H_gyv; FqNm6: GeiRS: goto E3GqL; E3GqL: ovUb1: goto FSQJZ; kR1js: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto KCkx6; wvnmO: if ($new_group_id) { goto x7Ofl; } goto kR1js; bDTSu: hb2vL: goto WKdlH; ulpP1: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto hb2vL; } goto Gy28z; Xbvgg: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto OvXml; kzMa3: x7Ofl: goto Xbvgg; yHlAD: $this->_render_page("auth/create_group", $this->data); goto vi3WX; WKdlH: $this->form_validation->set_rules("group_name", $this->lang->line("create_group_validation_name_label"), "trim|required|alpha_dash"); goto LfOit; vi3WX: } public function edit_group($id) { goto fVux3; FCE32: QUlPD: goto z8mEf; sm0Gy: $this->data["title"] = $this->lang->line("edit_group_title"); goto lFpkY; fVux3: if (!(!$id || empty($id))) { goto cVtxI; } goto W2Cq9; W2Cq9: redirect("auth", "refresh"); goto uFv8a; lFpkY: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto VhrN1; } goto XrqJ7; XrqJ7: redirect("auth", "refresh"); goto RS_uS; yhe56: $this->data["group"] = $group; goto OEywW; a0ceW: if ($group_update) { goto IGq3K; } goto ttNxZ; RS_uS: VhrN1: goto WxyYm; WxyYm: $group = $this->ion_auth->group($id)->row(); goto KCRbm; qxOC7: if (!($this->form_validation->run() === TRUE)) { goto QUlPD; } goto YWMoF; ttNxZ: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto cTotW; xdOO7: $this->data["group_description"] = ["name" => "group_description", "id" => "group_description", "type" => "text", "value" => $this->form_validation->set_value("group_description", $group->description)]; goto G0wkt; iVD1N: IGq3K: goto rFW9P; z8mEf: lqXEo: goto tgGL4; cTotW: goto aOBWx; goto iVD1N; YWMoF: $group_update = $this->ion_auth->update_group($id, $_POST["group_name"], array("description" => $_POST["group_description"])); goto a0ceW; AOq7_: aOBWx: goto FCE32; oCkRM: redirect("auth", "refresh"); goto AOq7_; KCRbm: $this->form_validation->set_rules("group_name", $this->lang->line("edit_group_validation_name_label"), "trim|required|alpha_dash"); goto wrzve; uFv8a: cVtxI: goto sm0Gy; wrzve: if (!(isset($_POST) && !empty($_POST))) { goto lqXEo; } goto qxOC7; E1G1c: $this->data["group_name"]["readonly"] = "readonly"; goto rjWed; r0GLA: if (!($this->config->item("admin_group", "ion_auth") === $group->name)) { goto EI3Uy; } goto E1G1c; tgGL4: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto yhe56; G0wkt: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "edit_group", $this->data); goto WLiLE; rjWed: EI3Uy: goto xdOO7; OEywW: $this->data["group_name"] = ["name" => "group_name", "id" => "group_name", "type" => "text", "value" => $this->form_validation->set_value("group_name", $group->name)]; goto r0GLA; rFW9P: $this->session->set_flashdata("message", $this->lang->line("edit_group_saved")); goto oCkRM; WLiLE: } public function _get_csrf_nonce() { goto f8Yeo; J85lW: $this->session->set_flashdata("csrfkey", $key); goto s2j72; s2j72: $this->session->set_flashdata("csrfvalue", $value); goto XA5Ez; XA5Ez: return [$key => $value]; goto p267z; WJ6KC: $key = random_string("alnum", 8); goto FAMkL; FAMkL: $value = random_string("alnum", 20); goto J85lW; f8Yeo: $this->load->helper("string"); goto WJ6KC; p267z: } public function _valid_csrf_nonce() { goto WGBHf; emqL8: return FALSE; goto Jqwob; Ihcck: return TRUE; goto EYAvk; EYAvk: UyUes: goto emqL8; SB222: if (!($csrfkey && $csrfkey === $this->session->flashdata("csrfvalue"))) { goto UyUes; } goto Ihcck; WGBHf: $csrfkey = $this->input->post($this->session->flashdata("csrfkey")); goto SB222; Jqwob: } public function _render_page($view, $data = NULL, $returnhtml = FALSE) { goto yiYDx; rwxSY: if (!$returnhtml) { goto aB8zj; } goto k3uJ3; k3uJ3: return $view_html; goto opfUp; sljT5: $view_html = $this->load->view($view, $viewdata, $returnhtml); goto rwxSY; yiYDx: $viewdata = empty($data) ? $this->data : $data; goto sljT5; opfUp: aB8zj: goto AVYoh; AVYoh: } }
?>
Did this file decode correctly?
Original Code
<?php
defined("BASEPATH") or exit("No direct script access allowed"); class Auth extends CI_Controller { public $data = array(); public function __construct() { goto rCtXY; sFJGb: $this->lang->load("auth"); goto ol7HA; AxdHb: $this->load->database(); goto mGUdR; mGUdR: $this->load->library("form_validation"); goto VFXL7; UyZpZ: $this->form_validation->set_error_delimiters($this->config->item("error_start_delimiter", "ion_auth"), $this->config->item("error_end_delimiter", "ion_auth")); goto sFJGb; VFXL7: $this->load->helper(["url", "language"]); goto UyZpZ; rCtXY: parent::__construct(); goto AxdHb; ol7HA: } public function output_json($data) { $this->output->set_content_type("application/json")->set_output(json_encode($data)); } public function index() { goto F_6nK; x9ymK: if (!$this->ion_auth->logged_in()) { goto NU2EE; } goto aOfNB; l03ae: $group = $this->ion_auth->get_users_groups($user_id)->row()->name; goto Z8UkN; BFmM1: $this->load->view("_templates/auth/_footer"); goto SNQh0; aOfNB: $user_id = $this->ion_auth->user()->row()->id; goto l03ae; wdgx0: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password", "placeholder" => "Password", "class" => "form-control"]; goto Uue3j; NpMpV: $this->data["identity"] = ["name" => "identity", "id" => "identity", "type" => "text", "placeholder" => "Username", "autofocus" => "autofocus", "class" => "form-control", "autocomplete" => "off"]; goto wdgx0; oMU0z: $this->load->view("_templates/auth/_header", $this->data); goto JXo02; JXo02: $this->load->view("auth/login"); goto BFmM1; oYgYE: if (!(count($this->db->list_tables()) == 0)) { goto nl8br; } goto FkMko; qq04m: $setting = $this->settings->getSetting(); goto bb0EA; bb0EA: if (!($setting == null)) { goto O1PM3; } goto WkBbm; FkMko: redirect("install"); goto jWxLm; WkBbm: redirect("install"); goto BNVsG; QbAot: NU2EE: goto sHx5O; sHx5O: $this->data["setting"] = $setting; goto NpMpV; jWxLm: nl8br: goto qq04m; BNVsG: O1PM3: goto x9ymK; F_6nK: $this->load->model("Settings_model", "settings"); goto oYgYE; Uue3j: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto oMU0z; Z8UkN: redirect("dashboard"); goto QbAot; SNQh0: } public function cek_login() { goto vxShw; JBzz7: eELDJ: goto v7ZAJ; OfjmC: lGhtC: goto w7F1I; mnKh1: goto sdmnd; goto OfjmC; xJaZZ: oF5DQ: goto Rc20m; Rc20m: $remember = (bool) $this->input->post("remember"); goto NoJyu; it1IG: if ($this->ion_auth->is_max_login_attempts_exceeded($this->input->post("identity"))) { goto lGhtC; } goto TwUDA; sUttE: $invalid = ["identity" => form_error("identity"), "password" => form_error("password")]; goto Qww7a; hyXes: if ($this->form_validation->run() === TRUE) { goto oF5DQ; } goto sUttE; my5Qw: $this->form_validation->set_rules("password", str_replace(":", '', $this->lang->line("login_password_label")), "required|trim"); goto hyXes; vxShw: $this->form_validation->set_rules("identity", str_replace(":", '', $this->lang->line("login_identity_label")), "required|trim"); goto my5Qw; oooYP: goto eELDJ; goto C5zaH; wjsCd: $this->cek_akses(); goto JBzz7; w7F1I: $data = ["status" => false, "failed" => "Anda sudah 3x melakukan percobaan login, silakan hubungi Administrator", "akses" => "attempts"]; goto vGeXp; NoJyu: if ($this->ion_auth->login($this->input->post("identity"), $this->input->post("password"), $remember)) { goto dj3zt; } goto it1IG; qjpCd: $this->output_json($data); goto oooYP; TwUDA: $data = ["status" => false, "failed" => "Incorrect Login", "akses" => "no attempts"]; goto mnKh1; Qww7a: $data = ["status" => false, "invalid" => $invalid, "akses" => "no valid"]; goto xVvzj; C5zaH: dj3zt: goto wjsCd; v7ZAJ: P2tb1: goto N6Wi3; L7vth: goto P2tb1; goto xJaZZ; vGeXp: sdmnd: goto qjpCd; xVvzj: $this->output_json($data); goto L7vth; N6Wi3: } public function cek_akses() { goto yjnvz; rTzCo: $status = false; goto VvwLd; gZFIj: $status = true; goto aSlVA; aSlVA: $this->load->model("Log_model", "logging"); goto CauM8; dIVuI: joYup: goto rTzCo; Zfamv: $this->output_json($data); goto qD_Fe; QP1Z2: $url = "dashboard"; goto gRWbi; VvwLd: $url = "auth"; goto bqB08; bqB08: bBsT7: goto H1bZM; CauM8: $this->logging->saveLog(1, "Login"); goto QP1Z2; H1bZM: $data = ["status" => $status, "url" => $url]; goto Zfamv; yjnvz: if (!$this->ion_auth->logged_in()) { goto joYup; } goto gZFIj; gRWbi: goto bBsT7; goto dIVuI; qD_Fe: } public function logout() { $this->ion_auth->logout(); redirect("login", "refresh"); } public function change_password() { goto oCZio; ODxnX: cJg2F: goto gQ4wN; l0VFi: $this->data["user_id"] = ["name" => "user_id", "id" => "user_id", "type" => "hidden", "value" => $user->id]; goto PEK08; sFvnv: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto V3Ap2; aeYtg: $identity = $this->session->userdata("identity"); goto GkicT; LdTv2: if ($change) { goto O526b; } goto Yl2tk; roW0s: $this->data["new_password"] = ["name" => "new", "id" => "new", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto nggSI; q4ICz: if ($this->ion_auth->logged_in()) { goto oCzo5; } goto I_yCj; F8Prr: goto cJg2F; goto bd_dm; OXh2l: oCzo5: goto VqiJD; NEmsT: redirect("auth/change_password", "refresh"); goto F8Prr; V3Ap2: $this->data["min_password_length"] = $this->config->item("min_password_length", "ion_auth"); goto wMfHp; ZAh8M: $this->logout(); goto ODxnX; wv4PA: znZVk: goto sFvnv; Yl2tk: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto NEmsT; oCZio: $this->form_validation->set_rules("old", $this->lang->line("change_password_validation_old_password_label"), "required"); goto kaRR7; l5rAk: A3Vax: goto TXxOp; sCmS3: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto ZAh8M; VqiJD: $user = $this->ion_auth->user()->row(); goto e15hx; gQ4wN: goto A3Vax; goto wv4PA; l20b3: $this->form_validation->set_rules("new_confirm", $this->lang->line("change_password_validation_new_password_confirm_label"), "required"); goto q4ICz; wMfHp: $this->data["old_password"] = ["name" => "old", "id" => "old", "type" => "password"]; goto roW0s; bd_dm: O526b: goto sCmS3; e15hx: if ($this->form_validation->run() === FALSE) { goto znZVk; } goto aeYtg; GkicT: $change = $this->ion_auth->change_password($identity, $this->input->post("old"), $this->input->post("new")); goto LdTv2; kaRR7: $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 l20b3; nggSI: $this->data["new_password_confirm"] = ["name" => "new_confirm", "id" => "new_confirm", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto l0VFi; I_yCj: redirect("auth/login", "refresh"); goto OXh2l; PEK08: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "change_password", $this->data); goto l5rAk; TXxOp: } public function forgot_password() { goto Pb4vd; j7SnJ: z6o31: goto xfZHN; ZWgn0: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto NWbgj; fupdK: if (!empty($identity)) { goto UZ9yt; } goto k2JbU; Afmm5: redirect("auth/forgot_password", "refresh"); goto eXrp2; r8q62: $this->data["identity"] = ["name" => "identity", "id" => "identity", "class" => "form-control", "autocomplete" => "off", "autofocus" => "autofocus"]; goto PcWK7; evYUt: $this->form_validation->set_rules("identity", $this->lang->line("forgot_password_identity_label"), "required"); goto ssaAt; dLOZy: $this->form_validation->set_rules("identity", $this->lang->line("forgot_password_validation_email_label"), "required|valid_email"); goto nYWzE; YL8hj: $identity_column = $this->config->item("identity", "ion_auth"); goto KIzc8; mbQoI: goto rMwIj; goto j7SnJ; t1VxA: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto Q1hML; E3y31: if ($this->config->item("identity", "ion_auth") != "email") { goto MYyrU; } goto dLOZy; xdVFy: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto ClJDH; G09kV: $forgotten = $this->ion_auth->forgotten_password($identity->{$this->config->item("identity", "ion_auth")}); goto CCoMy; ClJDH: redirect("auth/forgot_password", "refresh"); goto x7emi; eXrp2: IheL_: goto GIIpJ; KIzc8: $identity = $this->ion_auth->where($identity_column, $this->input->post("identity"))->users()->row(); goto fupdK; rLv1H: $this->data["type"] = $this->config->item("identity", "ion_auth"); goto r8q62; h64DH: W8Uoa: goto rYCoR; gjKgE: if ($this->form_validation->run() === FALSE) { goto Iku4J; } goto YL8hj; mhxaU: G7Xj9: goto kVUA2; b30KW: rMwIj: goto ZWgn0; DhCg7: $this->ion_auth->set_error("forgot_password_email_not_found"); goto mbQoI; ZGCdr: $this->data["identity_label"] = $this->lang->line("forgot_password_email_identity_label"); goto Qd5V1; GIIpJ: goto caILU; goto ekf3z; o7QCw: caILU: goto beZ51; x7emi: goto IheL_; goto mhxaU; NWbgj: redirect("auth/forgot_password", "refresh"); goto kWn1l; VoGAj: MYyrU: goto evYUt; xfZHN: $this->ion_auth->set_error("forgot_password_identity_not_found"); goto b30KW; Q1hML: $this->load->view("_templates/auth/_header", $this->data); goto qerQp; Qd5V1: goto F9v7p; goto h64DH; PcWK7: if ($this->config->item("identity", "ion_auth") != "email") { goto W8Uoa; } goto ZGCdr; nYWzE: goto O5GyO; goto VoGAj; k2JbU: if ($this->config->item("identity", "ion_auth") != "email") { goto z6o31; } goto DhCg7; qerQp: $this->load->view("auth/forgot_password"); goto aaH1P; ssaAt: O5GyO: goto gjKgE; aaH1P: $this->load->view("_templates/auth/_footer"); goto o7QCw; ekf3z: Iku4J: goto rLv1H; kWn1l: UZ9yt: goto G09kV; kVUA2: $this->session->set_flashdata("success", $this->ion_auth->messages()); goto Afmm5; cDI4y: F9v7p: goto t1VxA; rYCoR: $this->data["identity_label"] = $this->lang->line("forgot_password_identity_label"); goto cDI4y; Pb4vd: $this->data["title"] = $this->lang->line("forgot_password_heading"); goto E3y31; CCoMy: if ($forgotten) { goto G7Xj9; } goto xdVFy; beZ51: } public function reset_password($code = NULL) { goto FojOi; VNmaL: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto YnDi2; tHCrm: $this->data["user_id"] = ["name" => "user_id", "id" => "user_id", "type" => "hidden", "value" => $user->id]; goto RJXL0; eAGH5: $this->data["min_password_length"] = $this->config->item("min_password_length", "ion_auth"); goto AODKX; N2wip: $user = $this->ion_auth->forgotten_password_check($code); goto xl3vi; AODKX: $this->data["new_password"] = ["name" => "new", "id" => "new", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto eLIE5; iocvP: LrFaj: goto jP9es; A0jAs: $this->ion_auth->clear_forgotten_password_code($identity); goto gcYy2; tnIzk: $this->load->view("_templates/auth/_footer"); goto Se_vZ; DWT0T: vxrbc: goto BWi1B; CQ8hP: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto HlmPT; OOJFT: if ($this->form_validation->run() === FALSE) { goto LrFaj; } goto spFEa; BuohF: oSt5X: goto Eb5xN; spFEa: $identity = $user->{$this->config->item("identity", "ion_auth")}; goto v8VD3; sVarP: HIW1T: goto OEqWp; jH8GO: Kbaaf: goto A0jAs; v8VD3: if ($this->_valid_csrf_nonce() === FALSE || $user->id != $this->input->post("user_id")) { goto Kbaaf; } goto biU_4; LBU1N: UBZQR: goto VNmaL; OEqWp: $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 yA03w; pAVWR: $this->data["code"] = $code; goto GKPTq; gcYy2: show_error($this->lang->line("error_csrf")); goto DWT0T; BWi1B: goto lHOII; goto iocvP; GKPTq: $this->load->view("_templates/auth/_header"); goto rr3qi; o4Z2V: if ($change) { goto UBZQR; } goto CQ8hP; FojOi: if ($code) { goto oSt5X; } goto g6iLP; HlmPT: redirect("auth/reset_password/" . $code, "refresh"); goto g0Z9n; AqBub: JYsOv: goto s45nc; biU_4: $change = $this->ion_auth->reset_password($identity, $this->input->post("new")); goto o4Z2V; jP9es: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto eAGH5; g6iLP: show_404(); goto BuohF; eLIE5: $this->data["new_password_confirm"] = ["name" => "new_confirm", "id" => "new_confirm", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto tHCrm; vr1Fj: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto vd0AA; Eb5xN: $this->data["title"] = $this->lang->line("reset_password_heading"); goto N2wip; rr3qi: $this->load->view("auth/reset_password", $this->data); goto tnIzk; vd0AA: redirect("auth/forgot_password", "refresh"); goto V1_SM; s45nc: goto vxrbc; goto jH8GO; g0Z9n: goto JYsOv; goto LBU1N; RJXL0: $this->data["csrf"] = $this->_get_csrf_nonce(); goto pAVWR; PXjue: nqZiY: goto pnVQR; xl3vi: if ($user) { goto HIW1T; } goto vr1Fj; yA03w: $this->form_validation->set_rules("new_confirm", $this->lang->line("reset_password_validation_new_password_confirm_label"), "required"); goto OOJFT; V1_SM: goto nqZiY; goto sVarP; Se_vZ: lHOII: goto PXjue; YnDi2: redirect("auth/login", "refresh"); goto AqBub; pnVQR: } public function activate($id, $code = FALSE) { goto LAeQ0; tHx0B: $activation = $this->ion_auth->activate($id, $code); goto v8imv; HmbR6: if ($activation) { goto wA5Hs; } goto lYiLt; J5xkJ: $activation = $this->ion_auth->activate($id); goto RfBrk; EV84N: if ($code !== FALSE) { goto Y3fqk; } goto imDSd; W1IKi: Y3fqk: goto tHx0B; E0TXS: redirect("auth", "refresh"); goto NAnTM; imDSd: if (!$this->ion_auth->is_admin()) { goto wDD1m; } goto J5xkJ; TSldl: redirect("auth/forgot_password", "refresh"); goto qZOf0; YL8PU: wA5Hs: goto EhNtH; lYiLt: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto TSldl; EhNtH: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto E0TXS; v8imv: Br0mL: goto HmbR6; xXhWt: goto Br0mL; goto W1IKi; qZOf0: goto pwPbV; goto YL8PU; RfBrk: wDD1m: goto xXhWt; NAnTM: pwPbV: goto XD0Gk; LAeQ0: $activation = FALSE; goto EV84N; XD0Gk: } public function deactivate($id = NULL) { goto mf08r; n8M0a: if ($this->form_validation->run() === FALSE) { goto p133D; } goto TlyLq; jv3bU: $this->data["user"] = $this->ion_auth->user($id)->row(); goto UaHr3; xttNL: ZY2E7: goto GnG_Q; YQQCL: goto m1OOh; goto gcKja; fLw9U: $this->form_validation->set_rules("confirm", $this->lang->line("deactivate_validation_confirm_label"), "required"); goto dygdk; wAGuP: if (!($this->ion_auth->logged_in() && $this->ion_auth->is_admin())) { goto y7_5K; } goto b4U5s; kPZ81: $this->load->library("form_validation"); goto fLw9U; ncZju: KMULA: goto jkrL6; jkrL6: redirect("auth", "refresh"); goto YQQCL; mJ9xX: $this->data["csrf"] = $this->_get_csrf_nonce(); goto jv3bU; jLkYU: m1OOh: goto nP3AM; dygdk: $this->form_validation->set_rules("id", $this->lang->line("deactivate_validation_user_id_label"), "required|alpha_numeric"); goto n8M0a; jWXOg: i3k9G: goto wAGuP; b4U5s: $this->ion_auth->deactivate($id); goto uYnzv; TlyLq: if (!($this->input->post("confirm") == "yes")) { goto KMULA; } goto p2Avs; UaHr3: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "deactivate_user", $this->data); goto jLkYU; gcKja: p133D: goto mJ9xX; mf08r: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto ZY2E7; } goto mbr7a; p2Avs: if (!($this->_valid_csrf_nonce() === FALSE || $id != $this->input->post("id"))) { goto i3k9G; } goto BixDh; BixDh: show_error($this->lang->line("error_csrf")); goto jWXOg; mbr7a: show_error("You must be an administrator to view this page."); goto xttNL; uYnzv: y7_5K: goto ncZju; GnG_Q: $id = (int) $id; goto kPZ81; nP3AM: } public function create_user() { goto codxK; GZXNZ: goto YxsZ9; goto S51pL; qYNun: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password", "value" => $this->form_validation->set_value("password")]; goto z_Imh; hNhAO: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto Lsod4; paYTC: $this->data["email"] = ["name" => "email", "id" => "email", "type" => "text", "value" => $this->form_validation->set_value("email")]; goto XlQjJ; lHGjh: $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 j7t4t; F9luG: IGEPd: goto WiWAH; DbyvO: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto wmYly; WiWAH: if ($this->form_validation->run() === TRUE && $this->ion_auth->register($identity, $password, $email, $additional_data)) { goto Cb68l; } goto hNhAO; FmHth: if ($identity_column !== "email") { goto iAui3; } goto UPoGQ; PA7E4: goto ZUPY3; goto jnEtB; fcKzw: $this->data["identity_column"] = $identity_column; goto zPXlw; RizJx: ZUPY3: goto Dc0xp; z_Imh: $this->data["password_confirm"] = ["name" => "password_confirm", "id" => "password_confirm", "type" => "password", "value" => $this->form_validation->set_value("password_confirm")]; goto fBBMs; vAs94: $tables = $this->config->item("tables", "ion_auth"); goto OebMa; ftsZp: $this->form_validation->set_rules("identity", $this->lang->line("create_user_validation_identity_label"), "trim|required|is_unique[" . $tables["users"] . "." . $identity_column . "]"); goto mGIIf; JK8vV: $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 F9luG; zPXlw: $this->form_validation->set_rules("first_name", $this->lang->line("create_user_validation_fname_label"), "trim|required"); goto E2Sgr; NHFi0: Rog18: goto vAs94; btFIO: $identity = $identity_column === "email" ? $email : $this->input->post("identity"); goto AnZzh; vdW_D: $this->data["phone"] = ["name" => "phone", "id" => "phone", "type" => "text", "value" => $this->form_validation->set_value("phone")]; goto qYNun; itqwA: $this->data["identity"] = ["name" => "identity", "id" => "identity", "type" => "text", "value" => $this->form_validation->set_value("identity")]; goto paYTC; mGIIf: $this->form_validation->set_rules("email", $this->lang->line("create_user_validation_email_label"), "trim|required|valid_email"); goto DPeJu; Lsod4: $this->data["first_name"] = ["name" => "first_name", "id" => "first_name", "type" => "text", "value" => $this->form_validation->set_value("first_name")]; goto OBMdK; PbFLi: if (!($this->form_validation->run() === TRUE)) { goto IGEPd; } goto jaWQG; DPeJu: YxsZ9: goto X_D0m; jaWQG: $email = strtolower($this->input->post("email")); goto btFIO; jnEtB: Cb68l: goto DbyvO; UPoGQ: $this->form_validation->set_rules("email", $this->lang->line("create_user_validation_email_label"), "trim|required|valid_email|is_unique[" . $tables["users"] . ".email]"); goto GZXNZ; QA25y: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto Rog18; } goto x7YYt; XlQjJ: $this->data["company"] = ["name" => "company", "id" => "company", "type" => "text", "value" => $this->form_validation->set_value("company")]; goto vdW_D; x7YYt: redirect("auth", "refresh"); goto NHFi0; j7t4t: $this->form_validation->set_rules("password_confirm", $this->lang->line("create_user_validation_password_confirm_label"), "required"); goto PbFLi; OBMdK: $this->data["last_name"] = ["name" => "last_name", "id" => "last_name", "type" => "text", "value" => $this->form_validation->set_value("last_name")]; goto itqwA; S51pL: iAui3: goto ftsZp; E2Sgr: $this->form_validation->set_rules("last_name", $this->lang->line("create_user_validation_lname_label"), "trim|required"); goto FmHth; OebMa: $identity_column = $this->config->item("identity", "ion_auth"); goto fcKzw; wmYly: redirect("auth", "refresh"); goto RizJx; AnZzh: $password = $this->input->post("password"); goto JK8vV; codxK: $this->data["title"] = $this->lang->line("create_user_heading"); goto QA25y; ZVgMu: $this->form_validation->set_rules("company", $this->lang->line("create_user_validation_company_label"), "trim"); goto lHGjh; fBBMs: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "create_user", $this->data); goto PA7E4; X_D0m: $this->form_validation->set_rules("phone", $this->lang->line("create_user_validation_phone_label"), "trim"); goto ZVgMu; Dc0xp: } public function redirectUser() { goto zkgph; VdY1f: redirect("auth", "refresh"); goto MPBRs; MPBRs: q1ee5: goto QHYTp; QHYTp: redirect("/", "refresh"); goto jpOjC; zkgph: if (!$this->ion_auth->is_admin()) { goto q1ee5; } goto VdY1f; jpOjC: } public function edit_user($id) { goto JP61w; Hu_ay: jued3: goto klZwE; x7pYs: $this->form_validation->set_rules("company", $this->lang->line("edit_user_validation_company_label"), "trim"); goto cu2MR; pDO_K: G4NeS: goto eYiXP; FSgwq: if ($this->ion_auth->update($user->id, $data)) { goto XrO53; } goto umzC4; zC0Oo: $this->_render_page("auth/edit_user", $this->data); goto UvCj0; nhLQj: $this->form_validation->set_rules("password_confirm", $this->lang->line("edit_user_validation_password_confirm_label"), "required"); goto HYnpZ; Ww2Pr: $this->data["password_confirm"] = ["name" => "password_confirm", "id" => "password_confirm", "type" => "password"]; goto zC0Oo; qSqVh: $data["password"] = $this->input->post("password"); goto D4OC9; vT2sE: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto wBSOB; umzC4: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto qzWF5; Bn7Ym: $this->data["first_name"] = ["name" => "first_name", "id" => "first_name", "type" => "text", "value" => $this->form_validation->set_value("first_name", $user->first_name)]; goto SU2Fb; D4OC9: cxDLR: goto GBIq7; PuPnf: $this->form_validation->set_rules("phone", $this->lang->line("edit_user_validation_phone_label"), "trim"); goto x7pYs; rO_W_: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin() && !($this->ion_auth->user()->row()->id == $id))) { goto AgTXn; } goto CMPej; hTafQ: if (!$this->input->post("password")) { goto cxDLR; } goto qSqVh; gp3ps: xSWMn: goto FSgwq; eYiXP: LPQHi: goto gp3ps; wBSOB: $this->data["user"] = $user; goto cubGn; GBIq7: if (!$this->ion_auth->is_admin()) { goto xSWMn; } goto mlVR0; OiJXZ: $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 nhLQj; OotOY: $currentGroups = $this->ion_auth->get_users_groups($id)->result(); goto rdqR8; penJ4: if (!(isset($groupData) && !empty($groupData))) { goto LPQHi; } goto s83nU; s83nU: foreach ($groupData as $grp) { $this->ion_auth->add_to_group($grp, $id); RqKJG: } goto pDO_K; Zn6SW: $groupData = $this->input->post("groups"); goto penJ4; ISfMP: goto Br6fh; goto vr5u7; cubGn: $this->data["groups"] = $groups; goto mfeDI; Fxo8_: $this->data["csrf"] = $this->_get_csrf_nonce(); goto vT2sE; SU2Fb: $this->data["last_name"] = ["name" => "last_name", "id" => "last_name", "type" => "text", "value" => $this->form_validation->set_value("last_name", $user->last_name)]; goto NMOo0; i_qV_: aeu_X: goto Fxo8_; lWxA0: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto f1I0y; vr5u7: XrO53: goto lWxA0; Sprlx: $this->form_validation->set_rules("last_name", $this->lang->line("edit_user_validation_lname_label"), "trim|required"); goto PuPnf; kgBX8: show_error($this->lang->line("error_csrf")); goto Hu_ay; t3l5W: $this->data["phone"] = ["name" => "phone", "id" => "phone", "type" => "text", "value" => $this->form_validation->set_value("phone", $user->phone)]; goto F9jlW; JP61w: $this->data["title"] = $this->lang->line("edit_user_heading"); goto rO_W_; HYnpZ: dNPZd: goto krGaM; f1I0y: $this->redirectUser(); goto D6AHW; cu2MR: if (!(isset($_POST) && !empty($_POST))) { goto aeu_X; } goto RQrjx; qzWF5: $this->redirectUser(); goto ISfMP; Mgcd2: $user = $this->ion_auth->user($id)->row(); goto zLBIc; Lum1h: AgTXn: goto Mgcd2; RQrjx: if (!($this->_valid_csrf_nonce() === FALSE || $id != $this->input->post("id"))) { goto jued3; } goto kgBX8; krGaM: if (!($this->form_validation->run() === TRUE)) { goto mqv23; } goto fl65m; D6AHW: Br6fh: goto PfbzT; zLBIc: $groups = $this->ion_auth->groups()->result_array(); goto OotOY; NMOo0: $this->data["company"] = ["name" => "company", "id" => "company", "type" => "text", "value" => $this->form_validation->set_value("company", $user->company)]; goto t3l5W; fl65m: $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 hTafQ; klZwE: if (!$this->input->post("password")) { goto dNPZd; } goto OiJXZ; mfeDI: $this->data["currentGroups"] = $currentGroups; goto Bn7Ym; F9jlW: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password"]; goto Ww2Pr; rdqR8: $this->form_validation->set_rules("first_name", $this->lang->line("edit_user_validation_fname_label"), "trim|required"); goto Sprlx; mlVR0: $this->ion_auth->remove_from_group('', $id); goto Zn6SW; CMPej: redirect("auth", "refresh"); goto Lum1h; PfbzT: mqv23: goto i_qV_; UvCj0: } public function create_group() { goto rSMZY; KCkx6: goto GeiRS; goto kzMa3; FSQJZ: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto rhcph; rSMZY: $this->data["title"] = $this->lang->line("create_group_title"); goto ulpP1; DBm7o: $new_group_id = $this->ion_auth->create_group($this->input->post("group_name"), $this->input->post("description")); goto wvnmO; OvXml: redirect("auth", "refresh"); goto FqNm6; Gy28z: redirect("auth", "refresh"); goto bDTSu; LfOit: if (!($this->form_validation->run() === TRUE)) { goto ovUb1; } goto DBm7o; H_gyv: $this->data["description"] = ["name" => "description", "id" => "description", "type" => "text", "value" => $this->form_validation->set_value("description")]; goto yHlAD; rhcph: $this->data["group_name"] = ["name" => "group_name", "id" => "group_name", "type" => "text", "value" => $this->form_validation->set_value("group_name")]; goto H_gyv; FqNm6: GeiRS: goto E3GqL; E3GqL: ovUb1: goto FSQJZ; kR1js: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto KCkx6; wvnmO: if ($new_group_id) { goto x7Ofl; } goto kR1js; bDTSu: hb2vL: goto WKdlH; ulpP1: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto hb2vL; } goto Gy28z; Xbvgg: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto OvXml; kzMa3: x7Ofl: goto Xbvgg; yHlAD: $this->_render_page("auth/create_group", $this->data); goto vi3WX; WKdlH: $this->form_validation->set_rules("group_name", $this->lang->line("create_group_validation_name_label"), "trim|required|alpha_dash"); goto LfOit; vi3WX: } public function edit_group($id) { goto fVux3; FCE32: QUlPD: goto z8mEf; sm0Gy: $this->data["title"] = $this->lang->line("edit_group_title"); goto lFpkY; fVux3: if (!(!$id || empty($id))) { goto cVtxI; } goto W2Cq9; W2Cq9: redirect("auth", "refresh"); goto uFv8a; lFpkY: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto VhrN1; } goto XrqJ7; XrqJ7: redirect("auth", "refresh"); goto RS_uS; yhe56: $this->data["group"] = $group; goto OEywW; a0ceW: if ($group_update) { goto IGq3K; } goto ttNxZ; RS_uS: VhrN1: goto WxyYm; WxyYm: $group = $this->ion_auth->group($id)->row(); goto KCRbm; qxOC7: if (!($this->form_validation->run() === TRUE)) { goto QUlPD; } goto YWMoF; ttNxZ: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto cTotW; xdOO7: $this->data["group_description"] = ["name" => "group_description", "id" => "group_description", "type" => "text", "value" => $this->form_validation->set_value("group_description", $group->description)]; goto G0wkt; iVD1N: IGq3K: goto rFW9P; z8mEf: lqXEo: goto tgGL4; cTotW: goto aOBWx; goto iVD1N; YWMoF: $group_update = $this->ion_auth->update_group($id, $_POST["group_name"], array("description" => $_POST["group_description"])); goto a0ceW; AOq7_: aOBWx: goto FCE32; oCkRM: redirect("auth", "refresh"); goto AOq7_; KCRbm: $this->form_validation->set_rules("group_name", $this->lang->line("edit_group_validation_name_label"), "trim|required|alpha_dash"); goto wrzve; uFv8a: cVtxI: goto sm0Gy; wrzve: if (!(isset($_POST) && !empty($_POST))) { goto lqXEo; } goto qxOC7; E1G1c: $this->data["group_name"]["readonly"] = "readonly"; goto rjWed; r0GLA: if (!($this->config->item("admin_group", "ion_auth") === $group->name)) { goto EI3Uy; } goto E1G1c; tgGL4: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto yhe56; G0wkt: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "edit_group", $this->data); goto WLiLE; rjWed: EI3Uy: goto xdOO7; OEywW: $this->data["group_name"] = ["name" => "group_name", "id" => "group_name", "type" => "text", "value" => $this->form_validation->set_value("group_name", $group->name)]; goto r0GLA; rFW9P: $this->session->set_flashdata("message", $this->lang->line("edit_group_saved")); goto oCkRM; WLiLE: } public function _get_csrf_nonce() { goto f8Yeo; J85lW: $this->session->set_flashdata("csrfkey", $key); goto s2j72; s2j72: $this->session->set_flashdata("csrfvalue", $value); goto XA5Ez; XA5Ez: return [$key => $value]; goto p267z; WJ6KC: $key = random_string("alnum", 8); goto FAMkL; FAMkL: $value = random_string("alnum", 20); goto J85lW; f8Yeo: $this->load->helper("string"); goto WJ6KC; p267z: } public function _valid_csrf_nonce() { goto WGBHf; emqL8: return FALSE; goto Jqwob; Ihcck: return TRUE; goto EYAvk; EYAvk: UyUes: goto emqL8; SB222: if (!($csrfkey && $csrfkey === $this->session->flashdata("csrfvalue"))) { goto UyUes; } goto Ihcck; WGBHf: $csrfkey = $this->input->post($this->session->flashdata("csrfkey")); goto SB222; Jqwob: } public function _render_page($view, $data = NULL, $returnhtml = FALSE) { goto yiYDx; rwxSY: if (!$returnhtml) { goto aB8zj; } goto k3uJ3; k3uJ3: return $view_html; goto opfUp; sljT5: $view_html = $this->load->view($view, $viewdata, $returnhtml); goto rwxSY; yiYDx: $viewdata = empty($data) ? $this->data : $data; goto sljT5; opfUp: aB8zj: goto AVYoh; AVYoh: } }
?>
Function Calls
None |
Stats
MD5 | fc2077b07b454bb05091d7ddb5e8470f |
Eval Count | 0 |
Decode Time | 120 ms |