Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
/* Decoded by unphp.net */ <?php /* ________________________________________ ..
Decoded Output download
/* Decoded by unphp.net */
<?php
/* ________________________________________
| GarudaCBT |
| https://github.com/garudacbt/cbt |
|________________________________________|
*/
defined("BASEPATH") or exit("No direct script access allowed"); class Auth extends CI_Controller { public $data = array(); public function __construct() { goto WK1fV; C6HzC: $this->load->library("form_validation"); goto eDloh; eDloh: $this->load->helper(["url", "language"]); goto i50hE; P7Byp: $this->lang->load("auth"); goto I9_Pl; CxbaI: $this->load->database(); goto C6HzC; i50hE: $this->form_validation->set_error_delimiters($this->config->item("error_start_delimiter", "ion_auth"), $this->config->item("error_end_delimiter", "ion_auth")); goto P7Byp; WK1fV: parent::__construct(); goto CxbaI; I9_Pl: } public function output_json($data) { $this->output->set_content_type("application/json")->set_output(json_encode($data)); } public function index() { goto jw7B8; fR2zM: XDoJa: goto oKIrb; sAlm4: redirect("install"); goto mIqrm; SqLLN: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto PEBtA; Dhf2U: $this->load->view("_templates/auth/_footer"); goto HAYjE; TbH2C: $user_id = $this->ion_auth->user()->row()->id; goto m609P; zET2u: $setting = $this->settings->getSetting(); goto ISWLx; f_xps: if (!$this->ion_auth->logged_in()) { goto XDoJa; } goto TbH2C; jw7B8: $this->load->model("Settings_model", "settings"); goto oQANN; oKIrb: $this->data["setting"] = $setting; goto XlbFE; XQ3AV: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password", "placeholder" => "Password", "class" => "form-control"]; goto SqLLN; A4eDe: redirect("dashboard"); goto fR2zM; Xii94: Z3LYx: goto f_xps; ISWLx: if (!($setting == null)) { goto Z3LYx; } goto n9hsw; m609P: $group = $this->ion_auth->get_users_groups($user_id)->row()->name; goto A4eDe; mIqrm: kBnLx: goto zET2u; PEBtA: $this->load->view("_templates/auth/_header", $this->data); goto h7Pmo; n9hsw: redirect("install"); goto Xii94; oQANN: if (!(count($this->db->list_tables()) == 0)) { goto kBnLx; } goto sAlm4; h7Pmo: $this->load->view("auth/login"); goto Dhf2U; XlbFE: $this->data["identity"] = ["name" => "identity", "id" => "identity", "type" => "text", "placeholder" => "Username", "autofocus" => "autofocus", "class" => "form-control", "autocomplete" => "off"]; goto XQ3AV; HAYjE: } public function cek_login() { goto oLLlT; xMDpd: ckDpX: goto njJZC; pLGyh: $this->output_json($data); goto szGHh; aEy5u: nHbef: goto VaMn8; Sof4T: $data = ["status" => false, "failed" => "Incorrect Login", "akses" => "no attempts"]; goto E0kjJ; szGHh: goto HHA_4; goto hKYzo; apP9O: pdROd: goto n4t3e; KnceX: $data = ["status" => false, "invalid" => $invalid, "akses" => "no valid"]; goto pLGyh; oLLlT: $this->form_validation->set_rules("identity", str_replace(":", '', $this->lang->line("login_identity_label")) ?? '', "required|trim"); goto IkXJ8; oWede: goto ckDpX; goto apP9O; KW3KJ: $remember = (bool) $this->input->post("remember"); goto HklOu; hKYzo: qRwsq: goto KW3KJ; E0kjJ: goto q4D_y; goto aEy5u; hQo8q: q4D_y: goto QRqpB; X_LY2: if ($this->form_validation->run() === TRUE) { goto qRwsq; } goto fu1I1; n4t3e: $this->cek_akses(); goto xMDpd; IJaK3: if ($this->ion_auth->is_max_login_attempts_exceeded($this->input->post("identity"))) { goto nHbef; } goto Sof4T; fu1I1: $invalid = ["identity" => form_error("identity"), "password" => form_error("password")]; goto KnceX; VaMn8: $data = ["status" => false, "failed" => "Anda sudah 3x melakukan percobaan login, silakan hubungi Administrator", "akses" => "attempts"]; goto hQo8q; IkXJ8: $this->form_validation->set_rules("password", str_replace(":", '', $this->lang->line("login_password_label")) ?? '', "required|trim"); goto X_LY2; HklOu: if ($this->ion_auth->login($this->input->post("identity"), $this->input->post("password"), $remember)) { goto pdROd; } goto IJaK3; njJZC: HHA_4: goto FLLgd; QRqpB: $this->output_json($data); goto oWede; FLLgd: } public function cek_akses() { goto Jvl6t; Wa5q2: $status = true; goto VsLco; Y3B2J: $status = false; goto xAiGn; VsLco: $this->load->model("Log_model", "logging"); goto ESDb0; BIOO1: $data = ["status" => $status, "url" => $url, "role" => $this->ion_auth->is_admin() ? "admin" : ($this->ion_auth->in_group("guru") ? "guru" : "siswa")]; goto z1SvK; Jvl6t: if (!$this->ion_auth->logged_in()) { goto CfkaG; } goto Wa5q2; e1SDN: jmfCz: goto BIOO1; NgnOz: goto jmfCz; goto yN2Ro; xAiGn: $url = "auth"; goto e1SDN; z1SvK: $this->output_json($data); goto FDJGB; XU2Gm: $url = "dashboard"; goto NgnOz; yN2Ro: CfkaG: goto Y3B2J; ESDb0: $this->logging->saveLog(1, "Login"); goto XU2Gm; FDJGB: } public function logout() { $this->ion_auth->logout(); redirect("login", "refresh"); } public function change_password() { goto YqvnR; ZTydj: $this->logout(); goto ljLVn; h42DI: $this->data["old_password"] = ["name" => "old", "id" => "old", "type" => "password"]; goto N_g3Y; dxXs_: wkRGw: goto wVpYD; rCBXX: tJidS: goto nPF83; MC00p: redirect("auth/change_password", "refresh"); goto j2Lb3; pamTy: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "change_password", $this->data); goto dxXs_; TjWmU: $this->data["new_password_confirm"] = ["name" => "new_confirm", "id" => "new_confirm", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto lZvlR; E3htk: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto MC00p; x0uC9: $identity = $this->session->userdata("identity"); goto hPVuQ; DEJGB: redirect("auth/login", "refresh"); goto ISTV5; X84iu: goto wkRGw; goto QComZ; j2Lb3: goto Rhasm; goto rCBXX; lZvlR: $this->data["user_id"] = ["name" => "user_id", "id" => "user_id", "type" => "hidden", "value" => $user->id]; goto pamTy; hPVuQ: $change = $this->ion_auth->change_password($identity, $this->input->post("old"), $this->input->post("new")); goto bdmW_; tWu1m: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto ilJJd; YqvnR: $this->form_validation->set_rules("old", $this->lang->line("change_password_validation_old_password_label"), "required"); goto TwZ_b; ljLVn: Rhasm: goto X84iu; bdmW_: if ($change) { goto tJidS; } goto E3htk; PzThf: $user = $this->ion_auth->user()->row(); goto nFsHq; nFsHq: if ($this->form_validation->run() === FALSE) { goto U3oDR; } goto x0uC9; TwZ_b: $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 O3aSy; O3aSy: $this->form_validation->set_rules("new_confirm", $this->lang->line("change_password_validation_new_password_confirm_label"), "required"); goto s_YvJ; QComZ: U3oDR: goto tWu1m; nPF83: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto ZTydj; ISTV5: k_bMq: goto PzThf; N_g3Y: $this->data["new_password"] = ["name" => "new", "id" => "new", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto TjWmU; ilJJd: $this->data["min_password_length"] = $this->config->item("min_password_length", "ion_auth"); goto h42DI; s_YvJ: if ($this->ion_auth->logged_in()) { goto k_bMq; } goto DEJGB; wVpYD: } public function forgot_password() { goto CmEoo; XcNSL: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto rI9yp; IRHtL: a8kT6: goto HYtNq; XXhig: $identity = $this->ion_auth->where($identity_column, $this->input->post("identity"))->users()->row(); goto eWsm1; CmEoo: $this->data["title"] = $this->lang->line("forgot_password_heading"); goto CwMNG; x1pPF: goto JCNl4; goto EJ87j; UnoYS: W7AXw: goto H6XNP; vYzNf: if ($this->config->item("identity", "ion_auth") != "email") { goto QsHhI; } goto kJ9_r; etLfp: Nd2ru: goto k5KYl; F2oDV: v_1C2: goto RgLTl; H6XNP: $this->form_validation->set_rules("identity", $this->lang->line("forgot_password_identity_label"), "required"); goto etLfp; rI9yp: redirect("auth/forgot_password", "refresh"); goto aOYhD; vEvI5: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto L_30g; GSGR1: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto qla3Y; L_30g: redirect("auth/forgot_password", "refresh"); goto LSMI5; j_R1K: XwtO2: goto GSGR1; bBxDv: ehfFj: goto E3Orn; E3Orn: goto OgZr4; goto K5qI3; COcpR: $this->load->view("auth/forgot_password"); goto AheGY; zUNje: $this->data["identity_label"] = $this->lang->line("forgot_password_email_identity_label"); goto kvf2R; LSMI5: goto ehfFj; goto F2oDV; aOYhD: DO69z: goto io7cQ; EJ87j: QsHhI: goto WHCid; bBPoV: goto Nd2ru; goto UnoYS; K5qI3: iGguf: goto fEqND; q0o49: $identity_column = $this->config->item("identity", "ion_auth"); goto XXhig; AheGY: $this->load->view("_templates/auth/_footer"); goto PGRhr; io7cQ: $forgotten = $this->ion_auth->forgotten_password($identity->{$this->config->item("identity", "ion_auth")}); goto O38KD; WHCid: $this->ion_auth->set_error("forgot_password_identity_not_found"); goto VcwjG; WNQoN: redirect("auth/forgot_password", "refresh"); goto bBxDv; kJ9_r: $this->ion_auth->set_error("forgot_password_email_not_found"); goto x1pPF; PGRhr: OgZr4: goto c26T6; CwMNG: if ($this->config->item("identity", "ion_auth") != "email") { goto W7AXw; } goto CVt0p; eWsm1: if (!empty($identity)) { goto DO69z; } goto vYzNf; CVt0p: $this->form_validation->set_rules("identity", $this->lang->line("forgot_password_validation_email_label"), "required|valid_email"); goto bBPoV; O38KD: if ($forgotten) { goto v_1C2; } goto vEvI5; RgLTl: $this->session->set_flashdata("success", $this->ion_auth->messages()); goto WNQoN; k5KYl: if ($this->form_validation->run() === FALSE) { goto iGguf; } goto q0o49; qla3Y: $this->load->view("_templates/auth/_header", $this->data); goto COcpR; VcwjG: JCNl4: goto XcNSL; BFK_s: if ($this->config->item("identity", "ion_auth") != "email") { goto a8kT6; } goto zUNje; kvf2R: goto XwtO2; goto IRHtL; HYtNq: $this->data["identity_label"] = $this->lang->line("forgot_password_identity_label"); goto j_R1K; uY3aI: $this->data["identity"] = ["name" => "identity", "id" => "identity", "class" => "form-control", "autocomplete" => "off", "autofocus" => "autofocus"]; goto BFK_s; fEqND: $this->data["type"] = $this->config->item("identity", "ion_auth"); goto uY3aI; c26T6: } public function reset_password($code = NULL) { goto RM6XD; pqOpW: n5aq0: goto LNdsA; p_EQW: cmuPE: goto mE7aK; VZWbr: StyoD: goto SVLqe; mE7aK: $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 S34oB; LsJoz: $user = $this->ion_auth->forgotten_password_check($code); goto s0Byk; ZvW7O: if ($change) { goto kUDI_; } goto bxjpU; IsSL2: $this->data["user_id"] = ["name" => "user_id", "id" => "user_id", "type" => "hidden", "value" => $user->id]; goto S3Na9; Xoxki: redirect("auth/reset_password/" . $code, "refresh"); goto BA3Ei; rsrFa: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto py3i1; NAeFn: goto sc69a; goto p_EQW; G2RY0: $this->data["new_password_confirm"] = ["name" => "new_confirm", "id" => "new_confirm", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto IsSL2; m02xo: redirect("auth/login", "refresh"); goto VZWbr; pEBrR: $this->data["code"] = $code; goto ztMMM; XF9t6: $this->data["min_password_length"] = $this->config->item("min_password_length", "ion_auth"); goto O9wNW; SvAwo: zcAEU: goto VF9ax; jVkIT: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto m02xo; qsL8r: $this->ion_auth->clear_forgotten_password_code($identity); goto o4Y9Y; O9wNW: $this->data["new_password"] = ["name" => "new", "id" => "new", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto G2RY0; S3Na9: $this->data["csrf"] = $this->_get_csrf_nonce(); goto pEBrR; BA3Ei: goto StyoD; goto xMmbn; SVLqe: goto KgFCQ; goto vyN7j; rgcqk: $this->load->view("auth/reset_password", $this->data); goto YZjil; jBNWS: if ($this->form_validation->run() === FALSE) { goto n5aq0; } goto m_tdx; YZjil: $this->load->view("_templates/auth/_footer"); goto SvAwo; py3i1: redirect("auth/forgot_password", "refresh"); goto NAeFn; pFmNP: goto zcAEU; goto pqOpW; LNdsA: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto XF9t6; tzaCu: $this->data["title"] = $this->lang->line("reset_password_heading"); goto LsJoz; xMmbn: kUDI_: goto jVkIT; s0Byk: if ($user) { goto cmuPE; } goto rsrFa; VF9ax: sc69a: goto ocV6s; dunTH: if ($this->_valid_csrf_nonce() === FALSE || $user->id != $this->input->post("user_id")) { goto Eof2a; } goto L6jUr; o4Y9Y: show_error($this->lang->line("error_csrf")); goto nnXg8; vyN7j: Eof2a: goto qsL8r; bxjpU: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto Xoxki; m_tdx: $identity = $user->{$this->config->item("identity", "ion_auth")}; goto dunTH; ztMMM: $this->load->view("_templates/auth/_header"); goto rgcqk; h3o3t: F2iF0: goto tzaCu; L6jUr: $change = $this->ion_auth->reset_password($identity, $this->input->post("new")); goto ZvW7O; S34oB: $this->form_validation->set_rules("new_confirm", $this->lang->line("reset_password_validation_new_password_confirm_label"), "required"); goto jBNWS; RM6XD: if ($code) { goto F2iF0; } goto s1h2u; s1h2u: show_404(); goto h3o3t; nnXg8: KgFCQ: goto pFmNP; ocV6s: } public function activate($id, $code = FALSE) { goto zSWSN; IZ_Oy: if (!$this->ion_auth->is_admin()) { goto bJutZ; } goto yk9mt; cRHIK: MYrmg: goto uDtLk; kfB_M: if ($code !== FALSE) { goto NYMA9; } goto IZ_Oy; I8Wgp: CBmZb: goto xrcKU; BSj7e: $activation = $this->ion_auth->activate($id, $code); goto cRHIK; uzcRr: redirect("auth", "refresh"); goto I8Wgp; zSWSN: $activation = FALSE; goto kfB_M; H3qi1: goto CBmZb; goto Pxpj2; lKIvW: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto uzcRr; yk9mt: $activation = $this->ion_auth->activate($id); goto JzA7v; pHZvy: NYMA9: goto BSj7e; JzA7v: bJutZ: goto otXgd; bS1hj: redirect("auth/forgot_password", "refresh"); goto H3qi1; uDtLk: if ($activation) { goto ch1H2; } goto h46fs; Pxpj2: ch1H2: goto lKIvW; h46fs: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto bS1hj; otXgd: goto MYrmg; goto pHZvy; xrcKU: } public function deactivate($id = NULL) { goto tOj96; dDx_8: $this->form_validation->set_rules("id", $this->lang->line("deactivate_validation_user_id_label"), "required|alpha_numeric"); goto dfekg; wXdhp: $id = (int) $id; goto Bh1SX; NA8OP: if (!($this->input->post("confirm") == "yes")) { goto y22bi; } goto r9GSS; G8xAR: $this->data["csrf"] = $this->_get_csrf_nonce(); goto U19Tc; T2Z7U: y22bi: goto uPPtO; tOj96: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto XG7pR; } goto aob4_; nXmwD: goto gsP8i; goto gXzFF; Ady3b: show_error($this->lang->line("error_csrf")); goto G2KLr; dfekg: if ($this->form_validation->run() === FALSE) { goto l0dg_; } goto NA8OP; gXzFF: l0dg_: goto G8xAR; Bh1SX: $this->load->library("form_validation"); goto N1Z4a; aob4_: show_error("You must be an administrator to view this page."); goto eZ79y; G2KLr: MZ9_Y: goto bxbT1; N1Z4a: $this->form_validation->set_rules("confirm", $this->lang->line("deactivate_validation_confirm_label"), "required"); goto dDx_8; EGEeX: gsP8i: goto aQ0m6; eZ79y: XG7pR: goto wXdhp; kq3F5: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "deactivate_user", $this->data); goto EGEeX; uPPtO: redirect("auth", "refresh"); goto nXmwD; wQNqZ: $this->ion_auth->deactivate($id); goto pYQAp; bxbT1: if (!($this->ion_auth->logged_in() && $this->ion_auth->is_admin())) { goto Eu65H; } goto wQNqZ; U19Tc: $this->data["user"] = $this->ion_auth->user($id)->row(); goto kq3F5; pYQAp: Eu65H: goto T2Z7U; r9GSS: if (!($this->_valid_csrf_nonce() === FALSE || $id != $this->input->post("id"))) { goto MZ9_Y; } goto Ady3b; aQ0m6: } public function create_user() { goto BbQs2; BbQs2: $this->data["title"] = $this->lang->line("create_user_heading"); goto x3dW8; BBnuX: $this->data["identity_column"] = $identity_column; goto YOC_P; IgtP5: QZHBW: goto KSpmM; DyOj0: $this->data["phone"] = ["name" => "phone", "id" => "phone", "type" => "text", "value" => $this->form_validation->set_value("phone")]; goto cin3r; vwUGO: $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 aSffo; ZYoYG: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto wbxBE; pqwld: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "create_user", $this->data); goto zYVda; ThXEK: $this->form_validation->set_rules("last_name", $this->lang->line("create_user_validation_lname_label"), "trim|required"); goto ar8Y1; zGxp3: $this->data["email"] = ["name" => "email", "id" => "email", "type" => "text", "value" => $this->form_validation->set_value("email")]; goto khQTb; vWvuO: redirect("auth", "refresh"); goto QceOW; RGYks: $this->data["last_name"] = ["name" => "last_name", "id" => "last_name", "type" => "text", "value" => $this->form_validation->set_value("last_name")]; goto AGFEV; wbtMc: $this->form_validation->set_rules("identity", $this->lang->line("create_user_validation_identity_label"), "trim|required|is_unique[" . $tables["users"] . "." . $identity_column . "]"); goto ZPK9H; aSffo: $this->form_validation->set_rules("password_confirm", $this->lang->line("create_user_validation_password_confirm_label"), "required"); goto RIVDy; f6mk0: goto QZHBW; goto Q139M; Q139M: C1GWG: goto wbtMc; RIVDy: if (!($this->form_validation->run() === TRUE)) { goto uSegJ; } goto DzytH; x3dW8: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto qi9yK; } goto m1x8m; YOC_P: $this->form_validation->set_rules("first_name", $this->lang->line("create_user_validation_fname_label"), "trim|required"); goto ThXEK; S8Hb2: $identity = $identity_column === "email" ? $email : $this->input->post("identity"); goto IWlnn; YW_uY: $this->form_validation->set_rules("company", $this->lang->line("create_user_validation_company_label"), "trim"); goto vwUGO; ACES8: uSegJ: goto c0G5M; c0G5M: if ($this->form_validation->run() === TRUE && $this->ion_auth->register($identity, $password, $email, $additional_data)) { goto A74Kw; } goto ZYoYG; sv7Mg: $this->data["password_confirm"] = ["name" => "password_confirm", "id" => "password_confirm", "type" => "password", "value" => $this->form_validation->set_value("password_confirm")]; goto pqwld; uh8D2: $this->form_validation->set_rules("email", $this->lang->line("create_user_validation_email_label"), "trim|required|valid_email|is_unique[" . $tables["users"] . ".email]"); goto f6mk0; AGFEV: $this->data["identity"] = ["name" => "identity", "id" => "identity", "type" => "text", "value" => $this->form_validation->set_value("identity")]; goto zGxp3; cin3r: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password", "value" => $this->form_validation->set_value("password")]; goto sv7Mg; KSpmM: $this->form_validation->set_rules("phone", $this->lang->line("create_user_validation_phone_label"), "trim"); goto YW_uY; QceOW: A2IgD: goto EW41D; DzytH: $email = strtolower($this->input->post("email")); goto S8Hb2; ar8Y1: if ($identity_column !== "email") { goto C1GWG; } goto uh8D2; ZPK9H: $this->form_validation->set_rules("email", $this->lang->line("create_user_validation_email_label"), "trim|required|valid_email"); goto IgtP5; m1x8m: redirect("auth", "refresh"); goto wtHql; zYVda: goto A2IgD; goto F0x37; IWlnn: $password = $this->input->post("password"); goto XPORR; F0x37: A74Kw: goto sgJBk; YIlUu: $tables = $this->config->item("tables", "ion_auth"); goto bTLJi; bTLJi: $identity_column = $this->config->item("identity", "ion_auth"); goto BBnuX; wbxBE: $this->data["first_name"] = ["name" => "first_name", "id" => "first_name", "type" => "text", "value" => $this->form_validation->set_value("first_name")]; goto RGYks; sgJBk: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto vWvuO; khQTb: $this->data["company"] = ["name" => "company", "id" => "company", "type" => "text", "value" => $this->form_validation->set_value("company")]; goto DyOj0; XPORR: $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 ACES8; wtHql: qi9yK: goto YIlUu; EW41D: } public function redirectUser() { goto woFtX; QjiCj: cxaTq: goto rltYs; woFtX: if (!$this->ion_auth->is_admin()) { goto cxaTq; } goto NTLZx; NTLZx: redirect("auth", "refresh"); goto QjiCj; rltYs: redirect("/", "refresh"); goto nK_ff; nK_ff: } public function edit_user($id) { goto RrjM3; hrVgO: if (!($this->_valid_csrf_nonce() === FALSE || $id != $this->input->post("id"))) { goto GSVXo; } goto g4tnm; dqWez: $groupData = $this->input->post("groups"); goto uXfUH; tglS4: Ux2kN: goto XoEl3; S0baW: $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 wQYUW; xEVgi: R0bsP: goto qjWPB; nP4RL: $this->data["groups"] = $groups; goto dMB1H; yksdH: Iou2j: goto Rhn6x; W2JI7: $this->data["first_name"] = ["name" => "first_name", "id" => "first_name", "type" => "text", "value" => $this->form_validation->set_value("first_name", $user->first_name)]; goto Np8Q1; e0pq5: $this->data["phone"] = ["name" => "phone", "id" => "phone", "type" => "text", "value" => $this->form_validation->set_value("phone", $user->phone)]; goto owmUR; Va6LK: GSVXo: goto aPohu; xgnjb: if (!(isset($_POST) && !empty($_POST))) { goto o9grS; } goto hrVgO; RrjM3: $this->data["title"] = $this->lang->line("edit_user_heading"); goto luB2M; tZ2w2: n1rOM: goto tglS4; l_oJw: redirect("auth", "refresh"); goto xEVgi; owmUR: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password"]; goto rkJgy; oFQOu: $this->redirectUser(); goto xRZxm; kLUIl: $groups = $this->ion_auth->groups()->result_array(); goto n5FTe; luB2M: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin() && !($this->ion_auth->user()->row()->id == $id))) { goto R0bsP; } goto l_oJw; n5FTe: $currentGroups = $this->ion_auth->get_users_groups($id)->result(); goto gzDGn; uXfUH: if (!(isset($groupData) && !empty($groupData))) { goto Ux2kN; } goto nzAc1; gzDGn: $this->form_validation->set_rules("first_name", $this->lang->line("edit_user_validation_fname_label"), "trim|required"); goto vAMND; iey3p: $this->form_validation->set_rules("phone", $this->lang->line("edit_user_validation_phone_label"), "trim"); goto D91pq; dMB1H: $this->data["currentGroups"] = $currentGroups; goto W2JI7; dwVhf: goto EQgiP; goto DLz5e; UZYQ9: R9rES: goto rHDud; J6qpw: if ($this->ion_auth->update($user->id, $data)) { goto qS5S5; } goto aZCMv; DLz5e: qS5S5: goto aAbkW; v3J58: $this->data["user"] = $user; goto nP4RL; eoxyw: $data["password"] = $this->input->post("password"); goto WFaqs; vAMND: $this->form_validation->set_rules("last_name", $this->lang->line("edit_user_validation_lname_label"), "trim|required"); goto iey3p; qjWPB: $user = $this->ion_auth->user($id)->row(); goto kLUIl; VgaOR: $this->ion_auth->remove_from_group('', $id); goto dqWez; aZCMv: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto JTsHi; rHDud: if (!($this->form_validation->run() === TRUE)) { goto Iou2j; } goto cORIW; ktU3a: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto v3J58; gXGt3: if (!$this->input->post("password")) { goto zi_jc; } goto eoxyw; XoEl3: ruPX9: goto J6qpw; Rhn6x: o9grS: goto js1sV; aPohu: if (!$this->input->post("password")) { goto R9rES; } goto S0baW; xRZxm: EQgiP: goto yksdH; rAkEU: $this->_render_page("auth/edit_user", $this->data); goto GpYBf; JTsHi: $this->redirectUser(); goto dwVhf; D91pq: $this->form_validation->set_rules("company", $this->lang->line("edit_user_validation_company_label"), "trim"); goto xgnjb; cORIW: $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 gXGt3; ND2gU: $this->data["company"] = ["name" => "company", "id" => "company", "type" => "text", "value" => $this->form_validation->set_value("company", $user->company)]; goto e0pq5; aAbkW: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto oFQOu; nzAc1: foreach ($groupData as $grp) { $this->ion_auth->add_to_group($grp, $id); d__0i: } goto tZ2w2; WFaqs: zi_jc: goto tDsCv; g4tnm: show_error($this->lang->line("error_csrf")); goto Va6LK; js1sV: $this->data["csrf"] = $this->_get_csrf_nonce(); goto ktU3a; rkJgy: $this->data["password_confirm"] = ["name" => "password_confirm", "id" => "password_confirm", "type" => "password"]; goto rAkEU; tDsCv: if (!$this->ion_auth->is_admin()) { goto ruPX9; } goto VgaOR; Np8Q1: $this->data["last_name"] = ["name" => "last_name", "id" => "last_name", "type" => "text", "value" => $this->form_validation->set_value("last_name", $user->last_name)]; goto ND2gU; wQYUW: $this->form_validation->set_rules("password_confirm", $this->lang->line("edit_user_validation_password_confirm_label"), "required"); goto UZYQ9; GpYBf: } public function create_group() { goto f7IKC; fRmHE: redirect("auth", "refresh"); goto lroM8; mrF9H: $this->data["group_name"] = ["name" => "group_name", "id" => "group_name", "type" => "text", "value" => $this->form_validation->set_value("group_name")]; goto pEkQS; GJdlw: $this->_render_page("auth/create_group", $this->data); goto Tsvtu; tkg4y: $new_group_id = $this->ion_auth->create_group($this->input->post("group_name"), $this->input->post("description")); goto DdKqZ; DdKqZ: if ($new_group_id) { goto uYgyR; } goto lDb18; lroM8: Whtlo: goto hryid; UeD8R: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto fRmHE; pEkQS: $this->data["description"] = ["name" => "description", "id" => "description", "type" => "text", "value" => $this->form_validation->set_value("description")]; goto GJdlw; Z3YVs: redirect("auth", "refresh"); goto uLrTp; YhBrM: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto mrF9H; hryid: wjWJJ: goto YhBrM; K_gi7: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto shfoc; } goto Z3YVs; CQRs7: goto Whtlo; goto HQPfS; AveN_: if (!($this->form_validation->run() === TRUE)) { goto wjWJJ; } goto tkg4y; HQPfS: uYgyR: goto UeD8R; lDb18: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto CQRs7; uLrTp: shfoc: goto UIwsu; UIwsu: $this->form_validation->set_rules("group_name", $this->lang->line("create_group_validation_name_label"), "trim|required|alpha_dash"); goto AveN_; f7IKC: $this->data["title"] = $this->lang->line("create_group_title"); goto K_gi7; Tsvtu: } public function edit_group($id) { goto G0XJN; B2Tc4: goto A7YOz; goto aisKw; ryCQD: redirect("auth", "refresh"); goto HqV64; YhdtJ: $this->data["group_name"]["readonly"] = "readonly"; goto qgJ35; wObEv: if (!(isset($_POST) && !empty($_POST))) { goto M_Bl1; } goto yGLW1; yFxpl: M_Bl1: goto Z1xSf; vTGR7: redirect("auth", "refresh"); goto Qd2Ev; tlt_M: if (!($this->config->item("admin_group", "ion_auth") === $group->name)) { goto oDw9i; } goto YhdtJ; A5vIi: $this->data["title"] = $this->lang->line("edit_group_title"); goto K3eFP; Qd2Ev: A7YOz: goto ZrxDt; Z1xSf: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto z3NR2; xqAin: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "edit_group", $this->data); goto aAEe3; K3eFP: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto ce17Q; } goto ryCQD; WtH7b: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto B2Tc4; KS11S: $this->form_validation->set_rules("group_name", $this->lang->line("edit_group_validation_name_label"), "trim|required|alpha_dash"); goto wObEv; G0XJN: if (!(!$id || empty($id))) { goto tXQ2I; } goto ya0z2; uvZhX: $this->data["group_description"] = ["name" => "group_description", "id" => "group_description", "type" => "text", "value" => $this->form_validation->set_value("group_description", $group->description)]; goto xqAin; aisKw: LXlBP: goto iOmin; yGLW1: if (!($this->form_validation->run() === TRUE)) { goto Od93S; } goto i0TD3; aDtKe: $group = $this->ion_auth->group($id)->row(); goto KS11S; k9M4p: if ($group_update) { goto LXlBP; } goto WtH7b; HqV64: ce17Q: goto aDtKe; iOmin: $this->session->set_flashdata("message", $this->lang->line("edit_group_saved")); goto vTGR7; i0TD3: $group_update = $this->ion_auth->update_group($id, $_POST["group_name"], array("description" => $_POST["group_description"])); goto k9M4p; DTqWP: $this->data["group_name"] = ["name" => "group_name", "id" => "group_name", "type" => "text", "value" => $this->form_validation->set_value("group_name", $group->name)]; goto tlt_M; qgJ35: oDw9i: goto uvZhX; ZrxDt: Od93S: goto yFxpl; z3NR2: $this->data["group"] = $group; goto DTqWP; si3aF: tXQ2I: goto A5vIi; ya0z2: redirect("auth", "refresh"); goto si3aF; aAEe3: } public function _get_csrf_nonce() { goto RGUI4; CeibK: $key = random_string("alnum", 8); goto QEuyr; RGUI4: $this->load->helper("string"); goto CeibK; umdiA: $this->session->set_flashdata("csrfkey", $key); goto lrmW9; DK8hf: return [$key => $value]; goto lX7pg; lrmW9: $this->session->set_flashdata("csrfvalue", $value); goto DK8hf; QEuyr: $value = random_string("alnum", 20); goto umdiA; lX7pg: } public function _valid_csrf_nonce() { goto vN3Ny; DwTS0: LMceJ: goto WEGa2; WEGa2: return FALSE; goto TkcOi; uSh7h: if (!($csrfkey && $csrfkey === $this->session->flashdata("csrfvalue"))) { goto LMceJ; } goto l2blf; l2blf: return TRUE; goto DwTS0; vN3Ny: $csrfkey = $this->input->post($this->session->flashdata("csrfkey")); goto uSh7h; TkcOi: } public function _render_page($view, $data = NULL, $returnhtml = FALSE) { goto x2odk; sESBW: bbNln: goto JptLO; rb1jA: if (!$returnhtml) { goto bbNln; } goto qLEUp; HBR8y: $view_html = $this->load->view($view, $viewdata, $returnhtml); goto rb1jA; qLEUp: return $view_html; goto sESBW; x2odk: $viewdata = empty($data) ? $this->data : $data; goto HBR8y; JptLO: } }
?>
Did this file decode correctly?
Original Code
/* Decoded by unphp.net */
<?php
/* ________________________________________
| GarudaCBT |
| https://github.com/garudacbt/cbt |
|________________________________________|
*/
defined("BASEPATH") or exit("No direct script access allowed"); class Auth extends CI_Controller { public $data = array(); public function __construct() { goto WK1fV; C6HzC: $this->load->library("form_validation"); goto eDloh; eDloh: $this->load->helper(["url", "language"]); goto i50hE; P7Byp: $this->lang->load("auth"); goto I9_Pl; CxbaI: $this->load->database(); goto C6HzC; i50hE: $this->form_validation->set_error_delimiters($this->config->item("error_start_delimiter", "ion_auth"), $this->config->item("error_end_delimiter", "ion_auth")); goto P7Byp; WK1fV: parent::__construct(); goto CxbaI; I9_Pl: } public function output_json($data) { $this->output->set_content_type("application/json")->set_output(json_encode($data)); } public function index() { goto jw7B8; fR2zM: XDoJa: goto oKIrb; sAlm4: redirect("install"); goto mIqrm; SqLLN: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto PEBtA; Dhf2U: $this->load->view("_templates/auth/_footer"); goto HAYjE; TbH2C: $user_id = $this->ion_auth->user()->row()->id; goto m609P; zET2u: $setting = $this->settings->getSetting(); goto ISWLx; f_xps: if (!$this->ion_auth->logged_in()) { goto XDoJa; } goto TbH2C; jw7B8: $this->load->model("Settings_model", "settings"); goto oQANN; oKIrb: $this->data["setting"] = $setting; goto XlbFE; XQ3AV: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password", "placeholder" => "Password", "class" => "form-control"]; goto SqLLN; A4eDe: redirect("dashboard"); goto fR2zM; Xii94: Z3LYx: goto f_xps; ISWLx: if (!($setting == null)) { goto Z3LYx; } goto n9hsw; m609P: $group = $this->ion_auth->get_users_groups($user_id)->row()->name; goto A4eDe; mIqrm: kBnLx: goto zET2u; PEBtA: $this->load->view("_templates/auth/_header", $this->data); goto h7Pmo; n9hsw: redirect("install"); goto Xii94; oQANN: if (!(count($this->db->list_tables()) == 0)) { goto kBnLx; } goto sAlm4; h7Pmo: $this->load->view("auth/login"); goto Dhf2U; XlbFE: $this->data["identity"] = ["name" => "identity", "id" => "identity", "type" => "text", "placeholder" => "Username", "autofocus" => "autofocus", "class" => "form-control", "autocomplete" => "off"]; goto XQ3AV; HAYjE: } public function cek_login() { goto oLLlT; xMDpd: ckDpX: goto njJZC; pLGyh: $this->output_json($data); goto szGHh; aEy5u: nHbef: goto VaMn8; Sof4T: $data = ["status" => false, "failed" => "Incorrect Login", "akses" => "no attempts"]; goto E0kjJ; szGHh: goto HHA_4; goto hKYzo; apP9O: pdROd: goto n4t3e; KnceX: $data = ["status" => false, "invalid" => $invalid, "akses" => "no valid"]; goto pLGyh; oLLlT: $this->form_validation->set_rules("identity", str_replace(":", '', $this->lang->line("login_identity_label")) ?? '', "required|trim"); goto IkXJ8; oWede: goto ckDpX; goto apP9O; KW3KJ: $remember = (bool) $this->input->post("remember"); goto HklOu; hKYzo: qRwsq: goto KW3KJ; E0kjJ: goto q4D_y; goto aEy5u; hQo8q: q4D_y: goto QRqpB; X_LY2: if ($this->form_validation->run() === TRUE) { goto qRwsq; } goto fu1I1; n4t3e: $this->cek_akses(); goto xMDpd; IJaK3: if ($this->ion_auth->is_max_login_attempts_exceeded($this->input->post("identity"))) { goto nHbef; } goto Sof4T; fu1I1: $invalid = ["identity" => form_error("identity"), "password" => form_error("password")]; goto KnceX; VaMn8: $data = ["status" => false, "failed" => "Anda sudah 3x melakukan percobaan login, silakan hubungi Administrator", "akses" => "attempts"]; goto hQo8q; IkXJ8: $this->form_validation->set_rules("password", str_replace(":", '', $this->lang->line("login_password_label")) ?? '', "required|trim"); goto X_LY2; HklOu: if ($this->ion_auth->login($this->input->post("identity"), $this->input->post("password"), $remember)) { goto pdROd; } goto IJaK3; njJZC: HHA_4: goto FLLgd; QRqpB: $this->output_json($data); goto oWede; FLLgd: } public function cek_akses() { goto Jvl6t; Wa5q2: $status = true; goto VsLco; Y3B2J: $status = false; goto xAiGn; VsLco: $this->load->model("Log_model", "logging"); goto ESDb0; BIOO1: $data = ["status" => $status, "url" => $url, "role" => $this->ion_auth->is_admin() ? "admin" : ($this->ion_auth->in_group("guru") ? "guru" : "siswa")]; goto z1SvK; Jvl6t: if (!$this->ion_auth->logged_in()) { goto CfkaG; } goto Wa5q2; e1SDN: jmfCz: goto BIOO1; NgnOz: goto jmfCz; goto yN2Ro; xAiGn: $url = "auth"; goto e1SDN; z1SvK: $this->output_json($data); goto FDJGB; XU2Gm: $url = "dashboard"; goto NgnOz; yN2Ro: CfkaG: goto Y3B2J; ESDb0: $this->logging->saveLog(1, "Login"); goto XU2Gm; FDJGB: } public function logout() { $this->ion_auth->logout(); redirect("login", "refresh"); } public function change_password() { goto YqvnR; ZTydj: $this->logout(); goto ljLVn; h42DI: $this->data["old_password"] = ["name" => "old", "id" => "old", "type" => "password"]; goto N_g3Y; dxXs_: wkRGw: goto wVpYD; rCBXX: tJidS: goto nPF83; MC00p: redirect("auth/change_password", "refresh"); goto j2Lb3; pamTy: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "change_password", $this->data); goto dxXs_; TjWmU: $this->data["new_password_confirm"] = ["name" => "new_confirm", "id" => "new_confirm", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto lZvlR; E3htk: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto MC00p; x0uC9: $identity = $this->session->userdata("identity"); goto hPVuQ; DEJGB: redirect("auth/login", "refresh"); goto ISTV5; X84iu: goto wkRGw; goto QComZ; j2Lb3: goto Rhasm; goto rCBXX; lZvlR: $this->data["user_id"] = ["name" => "user_id", "id" => "user_id", "type" => "hidden", "value" => $user->id]; goto pamTy; hPVuQ: $change = $this->ion_auth->change_password($identity, $this->input->post("old"), $this->input->post("new")); goto bdmW_; tWu1m: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto ilJJd; YqvnR: $this->form_validation->set_rules("old", $this->lang->line("change_password_validation_old_password_label"), "required"); goto TwZ_b; ljLVn: Rhasm: goto X84iu; bdmW_: if ($change) { goto tJidS; } goto E3htk; PzThf: $user = $this->ion_auth->user()->row(); goto nFsHq; nFsHq: if ($this->form_validation->run() === FALSE) { goto U3oDR; } goto x0uC9; TwZ_b: $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 O3aSy; O3aSy: $this->form_validation->set_rules("new_confirm", $this->lang->line("change_password_validation_new_password_confirm_label"), "required"); goto s_YvJ; QComZ: U3oDR: goto tWu1m; nPF83: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto ZTydj; ISTV5: k_bMq: goto PzThf; N_g3Y: $this->data["new_password"] = ["name" => "new", "id" => "new", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto TjWmU; ilJJd: $this->data["min_password_length"] = $this->config->item("min_password_length", "ion_auth"); goto h42DI; s_YvJ: if ($this->ion_auth->logged_in()) { goto k_bMq; } goto DEJGB; wVpYD: } public function forgot_password() { goto CmEoo; XcNSL: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto rI9yp; IRHtL: a8kT6: goto HYtNq; XXhig: $identity = $this->ion_auth->where($identity_column, $this->input->post("identity"))->users()->row(); goto eWsm1; CmEoo: $this->data["title"] = $this->lang->line("forgot_password_heading"); goto CwMNG; x1pPF: goto JCNl4; goto EJ87j; UnoYS: W7AXw: goto H6XNP; vYzNf: if ($this->config->item("identity", "ion_auth") != "email") { goto QsHhI; } goto kJ9_r; etLfp: Nd2ru: goto k5KYl; F2oDV: v_1C2: goto RgLTl; H6XNP: $this->form_validation->set_rules("identity", $this->lang->line("forgot_password_identity_label"), "required"); goto etLfp; rI9yp: redirect("auth/forgot_password", "refresh"); goto aOYhD; vEvI5: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto L_30g; GSGR1: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto qla3Y; L_30g: redirect("auth/forgot_password", "refresh"); goto LSMI5; j_R1K: XwtO2: goto GSGR1; bBxDv: ehfFj: goto E3Orn; E3Orn: goto OgZr4; goto K5qI3; COcpR: $this->load->view("auth/forgot_password"); goto AheGY; zUNje: $this->data["identity_label"] = $this->lang->line("forgot_password_email_identity_label"); goto kvf2R; LSMI5: goto ehfFj; goto F2oDV; aOYhD: DO69z: goto io7cQ; EJ87j: QsHhI: goto WHCid; bBPoV: goto Nd2ru; goto UnoYS; K5qI3: iGguf: goto fEqND; q0o49: $identity_column = $this->config->item("identity", "ion_auth"); goto XXhig; AheGY: $this->load->view("_templates/auth/_footer"); goto PGRhr; io7cQ: $forgotten = $this->ion_auth->forgotten_password($identity->{$this->config->item("identity", "ion_auth")}); goto O38KD; WHCid: $this->ion_auth->set_error("forgot_password_identity_not_found"); goto VcwjG; WNQoN: redirect("auth/forgot_password", "refresh"); goto bBxDv; kJ9_r: $this->ion_auth->set_error("forgot_password_email_not_found"); goto x1pPF; PGRhr: OgZr4: goto c26T6; CwMNG: if ($this->config->item("identity", "ion_auth") != "email") { goto W7AXw; } goto CVt0p; eWsm1: if (!empty($identity)) { goto DO69z; } goto vYzNf; CVt0p: $this->form_validation->set_rules("identity", $this->lang->line("forgot_password_validation_email_label"), "required|valid_email"); goto bBPoV; O38KD: if ($forgotten) { goto v_1C2; } goto vEvI5; RgLTl: $this->session->set_flashdata("success", $this->ion_auth->messages()); goto WNQoN; k5KYl: if ($this->form_validation->run() === FALSE) { goto iGguf; } goto q0o49; qla3Y: $this->load->view("_templates/auth/_header", $this->data); goto COcpR; VcwjG: JCNl4: goto XcNSL; BFK_s: if ($this->config->item("identity", "ion_auth") != "email") { goto a8kT6; } goto zUNje; kvf2R: goto XwtO2; goto IRHtL; HYtNq: $this->data["identity_label"] = $this->lang->line("forgot_password_identity_label"); goto j_R1K; uY3aI: $this->data["identity"] = ["name" => "identity", "id" => "identity", "class" => "form-control", "autocomplete" => "off", "autofocus" => "autofocus"]; goto BFK_s; fEqND: $this->data["type"] = $this->config->item("identity", "ion_auth"); goto uY3aI; c26T6: } public function reset_password($code = NULL) { goto RM6XD; pqOpW: n5aq0: goto LNdsA; p_EQW: cmuPE: goto mE7aK; VZWbr: StyoD: goto SVLqe; mE7aK: $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 S34oB; LsJoz: $user = $this->ion_auth->forgotten_password_check($code); goto s0Byk; ZvW7O: if ($change) { goto kUDI_; } goto bxjpU; IsSL2: $this->data["user_id"] = ["name" => "user_id", "id" => "user_id", "type" => "hidden", "value" => $user->id]; goto S3Na9; Xoxki: redirect("auth/reset_password/" . $code, "refresh"); goto BA3Ei; rsrFa: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto py3i1; NAeFn: goto sc69a; goto p_EQW; G2RY0: $this->data["new_password_confirm"] = ["name" => "new_confirm", "id" => "new_confirm", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto IsSL2; m02xo: redirect("auth/login", "refresh"); goto VZWbr; pEBrR: $this->data["code"] = $code; goto ztMMM; XF9t6: $this->data["min_password_length"] = $this->config->item("min_password_length", "ion_auth"); goto O9wNW; SvAwo: zcAEU: goto VF9ax; jVkIT: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto m02xo; qsL8r: $this->ion_auth->clear_forgotten_password_code($identity); goto o4Y9Y; O9wNW: $this->data["new_password"] = ["name" => "new", "id" => "new", "type" => "password", "pattern" => "^.{" . $this->data["min_password_length"] . "}.*$"]; goto G2RY0; S3Na9: $this->data["csrf"] = $this->_get_csrf_nonce(); goto pEBrR; BA3Ei: goto StyoD; goto xMmbn; SVLqe: goto KgFCQ; goto vyN7j; rgcqk: $this->load->view("auth/reset_password", $this->data); goto YZjil; jBNWS: if ($this->form_validation->run() === FALSE) { goto n5aq0; } goto m_tdx; YZjil: $this->load->view("_templates/auth/_footer"); goto SvAwo; py3i1: redirect("auth/forgot_password", "refresh"); goto NAeFn; pFmNP: goto zcAEU; goto pqOpW; LNdsA: $this->data["message"] = validation_errors() ? validation_errors() : $this->session->flashdata("message"); goto XF9t6; tzaCu: $this->data["title"] = $this->lang->line("reset_password_heading"); goto LsJoz; xMmbn: kUDI_: goto jVkIT; s0Byk: if ($user) { goto cmuPE; } goto rsrFa; VF9ax: sc69a: goto ocV6s; dunTH: if ($this->_valid_csrf_nonce() === FALSE || $user->id != $this->input->post("user_id")) { goto Eof2a; } goto L6jUr; o4Y9Y: show_error($this->lang->line("error_csrf")); goto nnXg8; vyN7j: Eof2a: goto qsL8r; bxjpU: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto Xoxki; m_tdx: $identity = $user->{$this->config->item("identity", "ion_auth")}; goto dunTH; ztMMM: $this->load->view("_templates/auth/_header"); goto rgcqk; h3o3t: F2iF0: goto tzaCu; L6jUr: $change = $this->ion_auth->reset_password($identity, $this->input->post("new")); goto ZvW7O; S34oB: $this->form_validation->set_rules("new_confirm", $this->lang->line("reset_password_validation_new_password_confirm_label"), "required"); goto jBNWS; RM6XD: if ($code) { goto F2iF0; } goto s1h2u; s1h2u: show_404(); goto h3o3t; nnXg8: KgFCQ: goto pFmNP; ocV6s: } public function activate($id, $code = FALSE) { goto zSWSN; IZ_Oy: if (!$this->ion_auth->is_admin()) { goto bJutZ; } goto yk9mt; cRHIK: MYrmg: goto uDtLk; kfB_M: if ($code !== FALSE) { goto NYMA9; } goto IZ_Oy; I8Wgp: CBmZb: goto xrcKU; BSj7e: $activation = $this->ion_auth->activate($id, $code); goto cRHIK; uzcRr: redirect("auth", "refresh"); goto I8Wgp; zSWSN: $activation = FALSE; goto kfB_M; H3qi1: goto CBmZb; goto Pxpj2; lKIvW: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto uzcRr; yk9mt: $activation = $this->ion_auth->activate($id); goto JzA7v; pHZvy: NYMA9: goto BSj7e; JzA7v: bJutZ: goto otXgd; bS1hj: redirect("auth/forgot_password", "refresh"); goto H3qi1; uDtLk: if ($activation) { goto ch1H2; } goto h46fs; Pxpj2: ch1H2: goto lKIvW; h46fs: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto bS1hj; otXgd: goto MYrmg; goto pHZvy; xrcKU: } public function deactivate($id = NULL) { goto tOj96; dDx_8: $this->form_validation->set_rules("id", $this->lang->line("deactivate_validation_user_id_label"), "required|alpha_numeric"); goto dfekg; wXdhp: $id = (int) $id; goto Bh1SX; NA8OP: if (!($this->input->post("confirm") == "yes")) { goto y22bi; } goto r9GSS; G8xAR: $this->data["csrf"] = $this->_get_csrf_nonce(); goto U19Tc; T2Z7U: y22bi: goto uPPtO; tOj96: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto XG7pR; } goto aob4_; nXmwD: goto gsP8i; goto gXzFF; Ady3b: show_error($this->lang->line("error_csrf")); goto G2KLr; dfekg: if ($this->form_validation->run() === FALSE) { goto l0dg_; } goto NA8OP; gXzFF: l0dg_: goto G8xAR; Bh1SX: $this->load->library("form_validation"); goto N1Z4a; aob4_: show_error("You must be an administrator to view this page."); goto eZ79y; G2KLr: MZ9_Y: goto bxbT1; N1Z4a: $this->form_validation->set_rules("confirm", $this->lang->line("deactivate_validation_confirm_label"), "required"); goto dDx_8; EGEeX: gsP8i: goto aQ0m6; eZ79y: XG7pR: goto wXdhp; kq3F5: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "deactivate_user", $this->data); goto EGEeX; uPPtO: redirect("auth", "refresh"); goto nXmwD; wQNqZ: $this->ion_auth->deactivate($id); goto pYQAp; bxbT1: if (!($this->ion_auth->logged_in() && $this->ion_auth->is_admin())) { goto Eu65H; } goto wQNqZ; U19Tc: $this->data["user"] = $this->ion_auth->user($id)->row(); goto kq3F5; pYQAp: Eu65H: goto T2Z7U; r9GSS: if (!($this->_valid_csrf_nonce() === FALSE || $id != $this->input->post("id"))) { goto MZ9_Y; } goto Ady3b; aQ0m6: } public function create_user() { goto BbQs2; BbQs2: $this->data["title"] = $this->lang->line("create_user_heading"); goto x3dW8; BBnuX: $this->data["identity_column"] = $identity_column; goto YOC_P; IgtP5: QZHBW: goto KSpmM; DyOj0: $this->data["phone"] = ["name" => "phone", "id" => "phone", "type" => "text", "value" => $this->form_validation->set_value("phone")]; goto cin3r; vwUGO: $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 aSffo; ZYoYG: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto wbxBE; pqwld: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "create_user", $this->data); goto zYVda; ThXEK: $this->form_validation->set_rules("last_name", $this->lang->line("create_user_validation_lname_label"), "trim|required"); goto ar8Y1; zGxp3: $this->data["email"] = ["name" => "email", "id" => "email", "type" => "text", "value" => $this->form_validation->set_value("email")]; goto khQTb; vWvuO: redirect("auth", "refresh"); goto QceOW; RGYks: $this->data["last_name"] = ["name" => "last_name", "id" => "last_name", "type" => "text", "value" => $this->form_validation->set_value("last_name")]; goto AGFEV; wbtMc: $this->form_validation->set_rules("identity", $this->lang->line("create_user_validation_identity_label"), "trim|required|is_unique[" . $tables["users"] . "." . $identity_column . "]"); goto ZPK9H; aSffo: $this->form_validation->set_rules("password_confirm", $this->lang->line("create_user_validation_password_confirm_label"), "required"); goto RIVDy; f6mk0: goto QZHBW; goto Q139M; Q139M: C1GWG: goto wbtMc; RIVDy: if (!($this->form_validation->run() === TRUE)) { goto uSegJ; } goto DzytH; x3dW8: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto qi9yK; } goto m1x8m; YOC_P: $this->form_validation->set_rules("first_name", $this->lang->line("create_user_validation_fname_label"), "trim|required"); goto ThXEK; S8Hb2: $identity = $identity_column === "email" ? $email : $this->input->post("identity"); goto IWlnn; YW_uY: $this->form_validation->set_rules("company", $this->lang->line("create_user_validation_company_label"), "trim"); goto vwUGO; ACES8: uSegJ: goto c0G5M; c0G5M: if ($this->form_validation->run() === TRUE && $this->ion_auth->register($identity, $password, $email, $additional_data)) { goto A74Kw; } goto ZYoYG; sv7Mg: $this->data["password_confirm"] = ["name" => "password_confirm", "id" => "password_confirm", "type" => "password", "value" => $this->form_validation->set_value("password_confirm")]; goto pqwld; uh8D2: $this->form_validation->set_rules("email", $this->lang->line("create_user_validation_email_label"), "trim|required|valid_email|is_unique[" . $tables["users"] . ".email]"); goto f6mk0; AGFEV: $this->data["identity"] = ["name" => "identity", "id" => "identity", "type" => "text", "value" => $this->form_validation->set_value("identity")]; goto zGxp3; cin3r: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password", "value" => $this->form_validation->set_value("password")]; goto sv7Mg; KSpmM: $this->form_validation->set_rules("phone", $this->lang->line("create_user_validation_phone_label"), "trim"); goto YW_uY; QceOW: A2IgD: goto EW41D; DzytH: $email = strtolower($this->input->post("email")); goto S8Hb2; ar8Y1: if ($identity_column !== "email") { goto C1GWG; } goto uh8D2; ZPK9H: $this->form_validation->set_rules("email", $this->lang->line("create_user_validation_email_label"), "trim|required|valid_email"); goto IgtP5; m1x8m: redirect("auth", "refresh"); goto wtHql; zYVda: goto A2IgD; goto F0x37; IWlnn: $password = $this->input->post("password"); goto XPORR; F0x37: A74Kw: goto sgJBk; YIlUu: $tables = $this->config->item("tables", "ion_auth"); goto bTLJi; bTLJi: $identity_column = $this->config->item("identity", "ion_auth"); goto BBnuX; wbxBE: $this->data["first_name"] = ["name" => "first_name", "id" => "first_name", "type" => "text", "value" => $this->form_validation->set_value("first_name")]; goto RGYks; sgJBk: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto vWvuO; khQTb: $this->data["company"] = ["name" => "company", "id" => "company", "type" => "text", "value" => $this->form_validation->set_value("company")]; goto DyOj0; XPORR: $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 ACES8; wtHql: qi9yK: goto YIlUu; EW41D: } public function redirectUser() { goto woFtX; QjiCj: cxaTq: goto rltYs; woFtX: if (!$this->ion_auth->is_admin()) { goto cxaTq; } goto NTLZx; NTLZx: redirect("auth", "refresh"); goto QjiCj; rltYs: redirect("/", "refresh"); goto nK_ff; nK_ff: } public function edit_user($id) { goto RrjM3; hrVgO: if (!($this->_valid_csrf_nonce() === FALSE || $id != $this->input->post("id"))) { goto GSVXo; } goto g4tnm; dqWez: $groupData = $this->input->post("groups"); goto uXfUH; tglS4: Ux2kN: goto XoEl3; S0baW: $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 wQYUW; xEVgi: R0bsP: goto qjWPB; nP4RL: $this->data["groups"] = $groups; goto dMB1H; yksdH: Iou2j: goto Rhn6x; W2JI7: $this->data["first_name"] = ["name" => "first_name", "id" => "first_name", "type" => "text", "value" => $this->form_validation->set_value("first_name", $user->first_name)]; goto Np8Q1; e0pq5: $this->data["phone"] = ["name" => "phone", "id" => "phone", "type" => "text", "value" => $this->form_validation->set_value("phone", $user->phone)]; goto owmUR; Va6LK: GSVXo: goto aPohu; xgnjb: if (!(isset($_POST) && !empty($_POST))) { goto o9grS; } goto hrVgO; RrjM3: $this->data["title"] = $this->lang->line("edit_user_heading"); goto luB2M; tZ2w2: n1rOM: goto tglS4; l_oJw: redirect("auth", "refresh"); goto xEVgi; owmUR: $this->data["password"] = ["name" => "password", "id" => "password", "type" => "password"]; goto rkJgy; oFQOu: $this->redirectUser(); goto xRZxm; kLUIl: $groups = $this->ion_auth->groups()->result_array(); goto n5FTe; luB2M: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin() && !($this->ion_auth->user()->row()->id == $id))) { goto R0bsP; } goto l_oJw; n5FTe: $currentGroups = $this->ion_auth->get_users_groups($id)->result(); goto gzDGn; uXfUH: if (!(isset($groupData) && !empty($groupData))) { goto Ux2kN; } goto nzAc1; gzDGn: $this->form_validation->set_rules("first_name", $this->lang->line("edit_user_validation_fname_label"), "trim|required"); goto vAMND; iey3p: $this->form_validation->set_rules("phone", $this->lang->line("edit_user_validation_phone_label"), "trim"); goto D91pq; dMB1H: $this->data["currentGroups"] = $currentGroups; goto W2JI7; dwVhf: goto EQgiP; goto DLz5e; UZYQ9: R9rES: goto rHDud; J6qpw: if ($this->ion_auth->update($user->id, $data)) { goto qS5S5; } goto aZCMv; DLz5e: qS5S5: goto aAbkW; v3J58: $this->data["user"] = $user; goto nP4RL; eoxyw: $data["password"] = $this->input->post("password"); goto WFaqs; vAMND: $this->form_validation->set_rules("last_name", $this->lang->line("edit_user_validation_lname_label"), "trim|required"); goto iey3p; qjWPB: $user = $this->ion_auth->user($id)->row(); goto kLUIl; VgaOR: $this->ion_auth->remove_from_group('', $id); goto dqWez; aZCMv: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto JTsHi; rHDud: if (!($this->form_validation->run() === TRUE)) { goto Iou2j; } goto cORIW; ktU3a: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto v3J58; gXGt3: if (!$this->input->post("password")) { goto zi_jc; } goto eoxyw; XoEl3: ruPX9: goto J6qpw; Rhn6x: o9grS: goto js1sV; aPohu: if (!$this->input->post("password")) { goto R9rES; } goto S0baW; xRZxm: EQgiP: goto yksdH; rAkEU: $this->_render_page("auth/edit_user", $this->data); goto GpYBf; JTsHi: $this->redirectUser(); goto dwVhf; D91pq: $this->form_validation->set_rules("company", $this->lang->line("edit_user_validation_company_label"), "trim"); goto xgnjb; cORIW: $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 gXGt3; ND2gU: $this->data["company"] = ["name" => "company", "id" => "company", "type" => "text", "value" => $this->form_validation->set_value("company", $user->company)]; goto e0pq5; aAbkW: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto oFQOu; nzAc1: foreach ($groupData as $grp) { $this->ion_auth->add_to_group($grp, $id); d__0i: } goto tZ2w2; WFaqs: zi_jc: goto tDsCv; g4tnm: show_error($this->lang->line("error_csrf")); goto Va6LK; js1sV: $this->data["csrf"] = $this->_get_csrf_nonce(); goto ktU3a; rkJgy: $this->data["password_confirm"] = ["name" => "password_confirm", "id" => "password_confirm", "type" => "password"]; goto rAkEU; tDsCv: if (!$this->ion_auth->is_admin()) { goto ruPX9; } goto VgaOR; Np8Q1: $this->data["last_name"] = ["name" => "last_name", "id" => "last_name", "type" => "text", "value" => $this->form_validation->set_value("last_name", $user->last_name)]; goto ND2gU; wQYUW: $this->form_validation->set_rules("password_confirm", $this->lang->line("edit_user_validation_password_confirm_label"), "required"); goto UZYQ9; GpYBf: } public function create_group() { goto f7IKC; fRmHE: redirect("auth", "refresh"); goto lroM8; mrF9H: $this->data["group_name"] = ["name" => "group_name", "id" => "group_name", "type" => "text", "value" => $this->form_validation->set_value("group_name")]; goto pEkQS; GJdlw: $this->_render_page("auth/create_group", $this->data); goto Tsvtu; tkg4y: $new_group_id = $this->ion_auth->create_group($this->input->post("group_name"), $this->input->post("description")); goto DdKqZ; DdKqZ: if ($new_group_id) { goto uYgyR; } goto lDb18; lroM8: Whtlo: goto hryid; UeD8R: $this->session->set_flashdata("message", $this->ion_auth->messages()); goto fRmHE; pEkQS: $this->data["description"] = ["name" => "description", "id" => "description", "type" => "text", "value" => $this->form_validation->set_value("description")]; goto GJdlw; Z3YVs: redirect("auth", "refresh"); goto uLrTp; YhBrM: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto mrF9H; hryid: wjWJJ: goto YhBrM; K_gi7: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto shfoc; } goto Z3YVs; CQRs7: goto Whtlo; goto HQPfS; AveN_: if (!($this->form_validation->run() === TRUE)) { goto wjWJJ; } goto tkg4y; HQPfS: uYgyR: goto UeD8R; lDb18: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto CQRs7; uLrTp: shfoc: goto UIwsu; UIwsu: $this->form_validation->set_rules("group_name", $this->lang->line("create_group_validation_name_label"), "trim|required|alpha_dash"); goto AveN_; f7IKC: $this->data["title"] = $this->lang->line("create_group_title"); goto K_gi7; Tsvtu: } public function edit_group($id) { goto G0XJN; B2Tc4: goto A7YOz; goto aisKw; ryCQD: redirect("auth", "refresh"); goto HqV64; YhdtJ: $this->data["group_name"]["readonly"] = "readonly"; goto qgJ35; wObEv: if (!(isset($_POST) && !empty($_POST))) { goto M_Bl1; } goto yGLW1; yFxpl: M_Bl1: goto Z1xSf; vTGR7: redirect("auth", "refresh"); goto Qd2Ev; tlt_M: if (!($this->config->item("admin_group", "ion_auth") === $group->name)) { goto oDw9i; } goto YhdtJ; A5vIi: $this->data["title"] = $this->lang->line("edit_group_title"); goto K3eFP; Qd2Ev: A7YOz: goto ZrxDt; Z1xSf: $this->data["message"] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata("message")); goto z3NR2; xqAin: $this->_render_page("auth" . DIRECTORY_SEPARATOR . "edit_group", $this->data); goto aAEe3; K3eFP: if (!(!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())) { goto ce17Q; } goto ryCQD; WtH7b: $this->session->set_flashdata("message", $this->ion_auth->errors()); goto B2Tc4; KS11S: $this->form_validation->set_rules("group_name", $this->lang->line("edit_group_validation_name_label"), "trim|required|alpha_dash"); goto wObEv; G0XJN: if (!(!$id || empty($id))) { goto tXQ2I; } goto ya0z2; uvZhX: $this->data["group_description"] = ["name" => "group_description", "id" => "group_description", "type" => "text", "value" => $this->form_validation->set_value("group_description", $group->description)]; goto xqAin; aisKw: LXlBP: goto iOmin; yGLW1: if (!($this->form_validation->run() === TRUE)) { goto Od93S; } goto i0TD3; aDtKe: $group = $this->ion_auth->group($id)->row(); goto KS11S; k9M4p: if ($group_update) { goto LXlBP; } goto WtH7b; HqV64: ce17Q: goto aDtKe; iOmin: $this->session->set_flashdata("message", $this->lang->line("edit_group_saved")); goto vTGR7; i0TD3: $group_update = $this->ion_auth->update_group($id, $_POST["group_name"], array("description" => $_POST["group_description"])); goto k9M4p; DTqWP: $this->data["group_name"] = ["name" => "group_name", "id" => "group_name", "type" => "text", "value" => $this->form_validation->set_value("group_name", $group->name)]; goto tlt_M; qgJ35: oDw9i: goto uvZhX; ZrxDt: Od93S: goto yFxpl; z3NR2: $this->data["group"] = $group; goto DTqWP; si3aF: tXQ2I: goto A5vIi; ya0z2: redirect("auth", "refresh"); goto si3aF; aAEe3: } public function _get_csrf_nonce() { goto RGUI4; CeibK: $key = random_string("alnum", 8); goto QEuyr; RGUI4: $this->load->helper("string"); goto CeibK; umdiA: $this->session->set_flashdata("csrfkey", $key); goto lrmW9; DK8hf: return [$key => $value]; goto lX7pg; lrmW9: $this->session->set_flashdata("csrfvalue", $value); goto DK8hf; QEuyr: $value = random_string("alnum", 20); goto umdiA; lX7pg: } public function _valid_csrf_nonce() { goto vN3Ny; DwTS0: LMceJ: goto WEGa2; WEGa2: return FALSE; goto TkcOi; uSh7h: if (!($csrfkey && $csrfkey === $this->session->flashdata("csrfvalue"))) { goto LMceJ; } goto l2blf; l2blf: return TRUE; goto DwTS0; vN3Ny: $csrfkey = $this->input->post($this->session->flashdata("csrfkey")); goto uSh7h; TkcOi: } public function _render_page($view, $data = NULL, $returnhtml = FALSE) { goto x2odk; sESBW: bbNln: goto JptLO; rb1jA: if (!$returnhtml) { goto bbNln; } goto qLEUp; HBR8y: $view_html = $this->load->view($view, $viewdata, $returnhtml); goto rb1jA; qLEUp: return $view_html; goto sESBW; x2odk: $viewdata = empty($data) ? $this->data : $data; goto HBR8y; JptLO: } }
?>
Function Calls
None |
Stats
MD5 | 787354938dc1bdda65d6eaf8b81115b6 |
Eval Count | 0 |
Decode Time | 69 ms |