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("\102\101\x53\105\120\101\x54\x48") or exit("\x4e\157\40\144\x69\x72\x6..

Decoded Output download

<?php 
  
 defined("BASEPATH") or exit("No direct script access allowed"); class Ion_auth_model extends CI_Model { const MAX_COOKIE_LIFETIME = 63072000; const MAX_PASSWORD_SIZE_BYTES = 4096; public $tables = array(); public $activation_code; public $new_password; public $identity; public $_ion_where = array(); public $_ion_select = array(); public $_ion_like = array(); public $_ion_limit = NULL; public $_ion_offset = NULL; public $_ion_order_by = NULL; public $_ion_order = NULL; protected $_ion_hooks; protected $response = NULL; protected $messages; protected $errors; protected $error_start_delimiter; protected $error_end_delimiter; public $_cache_user_in_group = array(); protected $_cache_groups = array(); protected $db; public function __construct() { goto tsVgj; QkZFa: $this->identity_column = $this->config->item("identity", "ion_auth"); goto swNT6; zdwNi: eNkee: goto oUVyI; gJKKM: $this->message_end_delimiter = $this->config->item("message_end_delimiter", "ion_auth"); goto Q7_b_; ECmWF: goto eNkee; goto gCiCy; V0JVA: $this->load->helper("date"); goto WePZH; QMa6B: goto f1ewT; goto XS14k; WePZH: $this->lang->load("ion_auth"); goto g6rdz; iPmyb: $this->messages = []; goto VfFeh; mJUV6: f1ewT: goto UJodD; Uuhks: $this->load->helper("cookie"); goto V0JVA; WMmoP: $this->hash_method = $this->config->item("hash_method", "ion_auth"); goto iPmyb; UJodD: $this->tables = $this->config->item("tables", "ion_auth"); goto QkZFa; Q7_b_: $this->error_start_delimiter = $this->config->item("error_start_delimiter", "ion_auth"); goto L1M3C; w3eEo: $CI =& get_instance(); goto a7AmD; gCiCy: IjoCh: goto b8faA; T0e24: $this->message_end_delimiter = $this->error_end_delimiter; goto zdwNi; H6lAG: if (empty($group_name)) { goto XXVNH; } goto WJaba; mYa3h: $delimiters_source = $this->config->item("delimiters_source", "ion_auth"); goto EQ5J3; tsVgj: $this->config->load("ion_auth", TRUE); goto Uuhks; GF6mb: $this->message_start_delimiter = $this->config->item("message_start_delimiter", "ion_auth"); goto gJKKM; SWS2D: $error_prefix = $form_validation_class->getProperty("_error_prefix"); goto CRiyz; xLY1M: $this->error_start_delimiter = $error_prefix->getValue($this->form_validation); goto fv00S; b8faA: $this->load->library("form_validation"); goto pX4zU; JCnEF: $this->error_end_delimiter = $error_suffix->getValue($this->form_validation); goto T0e24; XS14k: XXVNH: goto w3eEo; EQ5J3: if ($delimiters_source === "form_validation") { goto IjoCh; } goto GF6mb; a7AmD: $this->db = $CI->db; goto mJUV6; oUVyI: $this->_ion_hooks = new stdClass(); goto XZNc7; XZNc7: $this->trigger_events("model_constructor"); goto BnhqB; HDBgG: $error_suffix->setAccessible(TRUE); goto JCnEF; fv00S: $this->message_start_delimiter = $this->error_start_delimiter; goto xtgak; WJaba: $this->db = $this->load->database($group_name, TRUE, TRUE); goto QMa6B; CRiyz: $error_prefix->setAccessible(TRUE); goto xLY1M; g6rdz: $group_name = $this->config->item("database_group_name", "ion_auth"); goto H6lAG; VfFeh: $this->errors = []; goto mYa3h; pX4zU: $form_validation_class = new ReflectionClass("CI_Form_validation"); goto SWS2D; xtgak: $error_suffix = $form_validation_class->getProperty("_error_suffix"); goto HDBgG; L1M3C: $this->error_end_delimiter = $this->config->item("error_end_delimiter", "ion_auth"); goto ECmWF; swNT6: $this->join = $this->config->item("join", "ion_auth"); goto WMmoP; BnhqB: } public function db() { return $this->db; } public function hash_password($password, $identity = NULL) { goto v_NcB; Kfa2P: if (!($algo !== FALSE && $params !== FALSE)) { goto o42Qx; } goto CaYdC; YH0EB: return FALSE; goto FPcKW; Mw69h: return FALSE; goto Sixb4; CaYdC: return password_hash($password, $algo, $params); goto fmXdj; fmXdj: o42Qx: goto Mw69h; v_NcB: if (!(empty($password) || strpos($password, "") !== FALSE || strlen($password) > self::MAX_PASSWORD_SIZE_BYTES)) { goto CIcdz; } goto YH0EB; QrxoE: $params = $this->_get_hash_parameters($identity); goto Kfa2P; FPcKW: CIcdz: goto V0gl7; V0gl7: $algo = $this->_get_hash_algo(); goto QrxoE; Sixb4: } public function verify_password($password, $hash_password_db, $identity = NULL) { goto DN0f7; q9L2s: goto DPcUi; goto iGzgh; s21Mv: return FALSE; goto UQs2e; UQs2e: WhbxN: goto cB7yU; jPN7F: return $this->_password_verify_sha1_legacy($identity, $password, $hash_password_db); goto q9L2s; IV0hx: DPcUi: goto AOY5l; DN0f7: if (!(empty($password) || empty($hash_password_db) || strpos($password, "") !== FALSE || strlen($password) > self::MAX_PASSWORD_SIZE_BYTES)) { goto WhbxN; } goto s21Mv; C92mk: return password_verify($password, $hash_password_db); goto IV0hx; iGzgh: zeTOb: goto C92mk; cB7yU: if (strpos($hash_password_db, "$") === 0) { goto zeTOb; } goto jPN7F; AOY5l: } public function rehash_password_if_needed($hash, $identity, $password) { goto twPw2; MLuxN: HP2ii: goto Kex7V; Pgtgj: goto RYrz9; goto yjS31; XIFPw: $this->trigger_events(["rehash_password", "rehash_password_successful"]); goto ZnXjF; IQ1aI: if (!($algo !== FALSE && $params !== FALSE)) { goto HP2ii; } goto hW3Ec; yjS31: gbD4L: goto XIFPw; elq47: if ($this->_set_password_db($identity, $password)) { goto gbD4L; } goto JzKYW; JzKYW: $this->trigger_events(["rehash_password", "rehash_password_unsuccessful"]); goto Pgtgj; hW3Ec: if (!password_needs_rehash($hash, $algo, $params)) { goto Rcri1; } goto elq47; ZnXjF: RYrz9: goto NF7wz; NF7wz: Rcri1: goto MLuxN; twPw2: $algo = $this->_get_hash_algo(); goto X0FHI; X0FHI: $params = $this->_get_hash_parameters($identity); goto IQ1aI; Kex7V: } public function get_user_by_activation_code($user_code) { goto gQvjb; gQvjb: $token = $this->_retrieve_selector_validator_couple($user_code); goto aePMp; g4o_T: sfu2t: goto bjvqa; aePMp: $user = $this->where("activation_selector", $token->selector)->users()->row(); goto GddpD; PcH4V: if (!$this->verify_password($token->validator, $user->activation_code)) { goto sfu2t; } goto WKUjC; bjvqa: wokCH: goto o3fbf; GddpD: if (!$user) { goto wokCH; } goto PcH4V; o3fbf: return FALSE; goto hAzAy; WKUjC: return $user; goto g4o_T; hAzAy: } public function activate($id, $code = FALSE) { goto wD94m; ZfN_g: $this->set_error("activate_unsuccessful"); goto T5bkX; LJMzb: UkdBh: goto Zv18M; C8LK1: $user = $this->get_user_by_activation_code($code); goto CwPXY; T5bkX: return FALSE; goto kb3Fz; nf9XK: $this->trigger_events(["post_activate", "post_activate_successful"]); goto pSCL0; pSCL0: $this->set_message("activate_successful"); goto Qgq0r; CwPXY: DdGWr: goto GQwSK; Qgq0r: return TRUE; goto rk5dh; Zv18M: $this->trigger_events(["post_activate", "post_activate_unsuccessful"]); goto ZfN_g; SEZh3: if (!($this->db->affected_rows() === 1)) { goto wl3Ps; } goto nf9XK; dblJk: $data = ["activation_selector" => NULL, "activation_code" => NULL, "active" => 1]; goto aC19J; wD94m: $this->trigger_events("pre_activate"); goto XM6IJ; aC19J: $this->trigger_events("extra_where"); goto LKYw3; LKYw3: $this->db->update($this->tables["users"], $data, ["id" => $id]); goto SEZh3; XM6IJ: if (!($code !== FALSE)) { goto DdGWr; } goto C8LK1; rk5dh: wl3Ps: goto LJMzb; GQwSK: if (!($code === FALSE || $user && $user->id === $id)) { goto UkdBh; } goto dblJk; kb3Fz: } public function deactivate($id = NULL) { goto UWJ8C; R_OQF: $this->set_error("deactivate_unsuccessful"); goto QdWwK; jdmMD: goto OwRsL; goto CACg1; UWJ8C: $this->trigger_events("deactivate"); goto XrATN; iMYi9: $return = $this->db->affected_rows() == 1; goto E6MU8; gnuhT: return FALSE; goto maf6d; maf6d: OwRsL: goto CvwUd; F5ucu: return FALSE; goto bYseA; vTS1G: if (!($this->ion_auth->logged_in() && $this->user()->row()->id == $id)) { goto zm1vu; } goto r411d; r411d: $this->set_error("deactivate_current_user_unsuccessful"); goto F5ucu; y2duK: return $return; goto dvaGe; KkW5F: $this->set_error("deactivate_unsuccessful"); goto gnuhT; CvwUd: $token = $this->_generate_selector_validator_couple(20, 40); goto V20TQ; V20TQ: $this->activation_code = $token->user_code; goto P0WAo; P0WAo: $data = ["activation_selector" => $token->selector, "activation_code" => $token->validator_hashed, "active" => 0]; goto panEf; HedNx: xJZWv: goto y2duK; bYseA: zm1vu: goto jdmMD; ZZtbe: $this->set_message("deactivate_successful"); goto HedNx; IRGx1: $this->db->update($this->tables["users"], $data, ["id" => $id]); goto iMYi9; panEf: $this->trigger_events("extra_where"); goto IRGx1; qaSV1: Ask2K: goto ZZtbe; CACg1: jsYfW: goto KkW5F; XrATN: if (!isset($id)) { goto jsYfW; } goto vTS1G; QdWwK: goto xJZWv; goto qaSV1; E6MU8: if ($return) { goto Ask2K; } goto R_OQF; dvaGe: } public function clear_forgotten_password_code($identity) { goto eeoNP; DNpXc: return FALSE; goto vj2vw; eZGhi: return TRUE; goto TiCMP; Nh7qy: $data = ["forgotten_password_selector" => NULL, "forgotten_password_code" => NULL, "forgotten_password_time" => NULL]; goto JqJN9; vj2vw: v6IcE: goto Nh7qy; JqJN9: $this->db->update($this->tables["users"], $data, [$this->identity_column => $identity]); goto eZGhi; eeoNP: if (!empty($identity)) { goto v6IcE; } goto DNpXc; TiCMP: } public function clear_remember_code($identity) { goto bkBvD; JsTMm: return TRUE; goto XyI1b; h0wfb: z2KIX: goto I6lVL; pOJ2M: return FALSE; goto h0wfb; IO8ld: $this->db->update($this->tables["users"], $data, [$this->identity_column => $identity]); goto JsTMm; I6lVL: $data = ["remember_selector" => NULL, "remember_code" => NULL]; goto IO8ld; bkBvD: if (!empty($identity)) { goto z2KIX; } goto pOJ2M; XyI1b: } public function reset_password($identity, $new) { goto MS9g3; tolNK: if ($this->identity_check($identity)) { goto oxRiO; } goto J1XsE; MS9g3: $this->trigger_events("pre_change_password"); goto tolNK; qArNN: AtD0C: goto yweEG; yweEG: $this->trigger_events(["post_change_password", "post_change_password_successful"]); goto BVoJg; NpuDJ: $return = $this->_set_password_db($identity, $new); goto ruTNA; DQkZy: AEjal: goto FHSHr; cWtzf: $this->trigger_events(["post_change_password", "post_change_password_unsuccessful"]); goto Eh7PZ; xj2Zi: goto AEjal; goto qArNN; pJTVP: oxRiO: goto NpuDJ; BVoJg: $this->set_message("password_change_successful"); goto DQkZy; J1XsE: $this->trigger_events(["post_change_password", "post_change_password_unsuccessful"]); goto Gmd1N; Gmd1N: return FALSE; goto pJTVP; FHSHr: return $return; goto yTS_a; Eh7PZ: $this->set_error("password_change_unsuccessful"); goto xj2Zi; ruTNA: if ($return) { goto AtD0C; } goto cWtzf; yTS_a: } public function change_password($identity, $old, $new) { goto lOxwB; Hm3SV: return $result; goto Td2gj; bHSxe: if (!($query->num_rows() !== 1)) { goto tG7VR; } goto UqD2U; NBMqe: GgZ6_: goto Hm3SV; OSsUz: $query = $this->db->select("id, password")->where($this->identity_column, $identity)->limit(1)->order_by("id", "desc")->get($this->tables["users"]); goto bHSxe; pwN7_: $user = $query->row(); goto htqrE; lOxwB: $this->trigger_events("pre_change_password"); goto jd9WM; UqD2U: $this->trigger_events(["post_change_password", "post_change_password_unsuccessful"]); goto kLy9P; AOH5N: goto GgZ6_; goto PjbJr; ExRDg: $this->set_error("password_change_unsuccessful"); goto AOH5N; VRD53: $this->set_message("password_change_successful"); goto NBMqe; Td2gj: wrdjy: goto B2I0d; x9_04: return FALSE; goto AzpI5; kLy9P: $this->set_error("password_change_unsuccessful"); goto UdH9d; UdH9d: return FALSE; goto ymIQ4; qzeqL: if ($result) { goto FSa2q; } goto kJE6R; VF9ae: $result = $this->_set_password_db($identity, $new); goto qzeqL; B2I0d: $this->set_error("password_change_unsuccessful"); goto x9_04; kJE6R: $this->trigger_events(["post_change_password", "post_change_password_unsuccessful"]); goto ExRDg; htqrE: if (!$this->verify_password($old, $user->password, $identity)) { goto wrdjy; } goto VF9ae; jd9WM: $this->trigger_events("extra_where"); goto OSsUz; PjbJr: FSa2q: goto iefV_; ymIQ4: tG7VR: goto pwN7_; iefV_: $this->trigger_events(["post_change_password", "post_change_password_successful"]); goto VRD53; AzpI5: } public function username_check($username = '') { goto ArLkh; v2Zof: return FALSE; goto jmzGe; xceAr: return $this->db->where("username", $username)->limit(1)->count_all_results($this->tables["users"]) > 0; goto OUySX; rC0Ik: if (!empty($username)) { goto NWu73; } goto v2Zof; ArLkh: $this->trigger_events("username_check"); goto rC0Ik; ad7rM: $this->trigger_events("extra_where"); goto xceAr; jmzGe: NWu73: goto ad7rM; OUySX: } public function email_check($email = '') { goto iE2Ew; Qr6Bh: if (!empty($email)) { goto uU_Ha; } goto rPCMx; iE2Ew: $this->trigger_events("email_check"); goto Qr6Bh; adPRp: $this->trigger_events("extra_where"); goto i1orq; f_jvT: uU_Ha: goto adPRp; i1orq: return $this->db->where("email", $email)->limit(1)->count_all_results($this->tables["users"]) > 0; goto q3oBE; rPCMx: return FALSE; goto f_jvT; q3oBE: } public function identity_check($identity = '') { goto I2am1; I2am1: $this->trigger_events("identity_check"); goto KRabE; qpGfb: return FALSE; goto aas4C; aas4C: xK37V: goto zTL3s; zTL3s: return $this->db->where($this->identity_column, $identity)->limit(1)->count_all_results($this->tables["users"]) > 0; goto tTy9H; KRabE: if (!empty($identity)) { goto xK37V; } goto qpGfb; tTy9H: } public function get_user_id_from_identity($identity = '') { goto JxM8N; bS_e8: return FALSE; goto YvnrC; dwumm: $user = $query->row(); goto xsTdR; JxM8N: if (!empty($identity)) { goto P5FCn; } goto bS_e8; OyLoc: f4Tfu: goto dwumm; YvnrC: P5FCn: goto MxGwU; oml7x: if (!($query->num_rows() !== 1)) { goto f4Tfu; } goto hvMgj; xsTdR: return $user->id; goto MgKTO; hvMgj: return FALSE; goto OyLoc; MxGwU: $query = $this->db->select("id")->where($this->identity_column, $identity)->limit(1)->get($this->tables["users"]); goto oml7x; MgKTO: } public function forgotten_password($identity) { goto qIetQ; ZbtE6: $this->trigger_events(["post_forgotten_password", "post_forgotten_password_unsuccessful"]); goto EkuGq; u07Q9: $update = ["forgotten_password_selector" => $token->selector, "forgotten_password_code" => $token->validator_hashed, "forgotten_password_time" => time()]; goto TGMpL; rGQFE: $this->trigger_events(["post_forgotten_password", "post_forgotten_password_successful"]); goto nhjis; rU9sG: $this->trigger_events(["post_forgotten_password", "post_forgotten_password_unsuccessful"]); goto izAWN; qIetQ: if (!empty($identity)) { goto OD9ii; } goto ZbtE6; jNYPr: azF5T: goto k1UvE; OAGGz: OD9ii: goto vCtX2; EkuGq: return FALSE; goto OAGGz; pyew5: goto azF5T; goto xnRlz; vCtX2: $token = $this->_generate_selector_validator_couple(20, 80); goto u07Q9; izAWN: return FALSE; goto pyew5; xnRlz: xkmaI: goto rGQFE; TGMpL: $this->trigger_events("extra_where"); goto NEDVC; NEDVC: $this->db->update($this->tables["users"], $update, [$this->identity_column => $identity]); goto AcSyk; AcSyk: if ($this->db->affected_rows() === 1) { goto xkmaI; } goto rU9sG; nhjis: return $token->user_code; goto jNYPr; k1UvE: } public function get_user_by_forgotten_password_code($user_code) { goto jwSBY; f3djk: $user = $this->where("forgotten_password_selector", $token->selector)->users()->row(); goto En4YH; meyIc: guMn5: goto PfWp3; PfWp3: return FALSE; goto qXY10; En4YH: if (!$user) { goto guMn5; } goto It_3r; jwSBY: $token = $this->_retrieve_selector_validator_couple($user_code); goto f3djk; UDSME: qcvlu: goto meyIc; pX71L: return $user; goto UDSME; It_3r: if (!$this->verify_password($token->validator, $user->forgotten_password_code)) { goto qcvlu; } goto pX71L; qXY10: } public function register($identity, $password, $email, $additional_data = array(), $groups = array()) { goto x80LN; PvaUk: if (!(!$this->config->item("default_group", "ion_auth") && empty($groups))) { goto Jfxh6; } goto ttAS1; x80LN: $this->trigger_events("pre_register"); goto Z4EJR; u5BJ7: $this->set_error("account_creation_duplicate_identity"); goto Ae4cz; pWJwa: $this->trigger_events("extra_set"); goto zvFCN; fvy17: $ip_address = $this->input->ip_address(); goto eLl6y; mIeVp: if (empty($groups)) { goto EZuDu; } goto grGeI; Ae4cz: return FALSE; goto Gzpex; Gzpex: gJOYo: goto exH5O; kKdps: A__GL: goto oVpT5; mTB_K: return FALSE; goto kKdps; ttAS1: $this->set_error("account_creation_missing_default_group"); goto hXjt9; exH5O: $query = $this->db->get_where($this->tables["groups"], ["name" => $this->config->item("default_group", "ion_auth")], 1)->row(); goto ruuBt; BBN20: return FALSE; goto pVIpx; Jk1rX: NQsyr: goto u5BJ7; SOmBL: EZuDu: goto abyn4; abyn4: $this->trigger_events("post_register"); goto PC9dL; iOnYX: $data = [$this->identity_column => $identity, "username" => $identity, "password" => $password, "email" => $email, "ip_address" => $ip_address, "created_on" => time(), "active" => $manual_activation === FALSE ? 1 : 0]; goto NSS7G; EeGeE: $this->set_error("account_creation_invalid_default_group"); goto mTB_K; YGdhk: $id = $this->db->insert_id($this->tables["users"] . "_id_seq"); goto ZgclR; Z4EJR: $manual_activation = $this->config->item("manual_activation", "ion_auth"); goto rs3kB; zvFCN: $this->db->insert($this->tables["users"], $user_data); goto YGdhk; rs3kB: if ($this->identity_check($identity)) { goto NQsyr; } goto PvaUk; XsgOu: $this->set_error("account_creation_unsuccessful"); goto BBN20; grGeI: foreach ($groups as $group) { $this->add_to_group($group, $id); HLD6a: } goto tOsxO; tOsxO: NL42W: goto SOmBL; oVpT5: $default_group = $query; goto fvy17; PC9dL: return isset($id) ? $id : FALSE; goto OqXWS; hXjt9: return FALSE; goto PSKNC; bobo3: $groups[] = $default_group->id; goto gXHPK; PSKNC: Jfxh6: goto daLsR; gXHPK: EokyX: goto mIeVp; ruuBt: if (!(!isset($query->id) && empty($groups))) { goto A__GL; } goto EeGeE; pVIpx: VWHdg: goto iOnYX; NSS7G: $user_data = array_merge($this->_filter_data($this->tables["users"], $additional_data), $data); goto pWJwa; zvKfz: if (!($password === FALSE)) { goto VWHdg; } goto XsgOu; ZgclR: if (!(isset($default_group->id) && empty($groups))) { goto EokyX; } goto bobo3; daLsR: goto gJOYo; goto Jk1rX; eLl6y: $password = $this->hash_password($password); goto zvKfz; OqXWS: } public function login($identity, $password, $remember = FALSE) { goto HMSwX; o0tya: rfAW_: goto AskmO; Ypclj: if (!$this->is_max_login_attempts_exceeded($identity)) { goto zrMwK; } goto OrYkx; Xmmz9: Kcm3O: goto o0tya; HMSwX: $this->trigger_events("pre_login"); goto xRu0n; wOB5j: $query = $this->db->select($this->identity_column . ", email, id, password, active, last_login")->where($this->identity_column, $identity)->limit(1)->order_by("id", "desc")->get($this->tables["users"]); goto Ypclj; vwwrS: $this->trigger_events("post_login_unsuccessful"); goto eWdy3; xRu0n: if (!(empty($identity) || empty($password))) { goto I4lUP; } goto lDhYH; M290P: $this->clear_forgotten_password_code($identity); goto zvWRC; INY3k: $this->trigger_events(["post_login", "post_login_successful"]); goto SyG0A; vzKmN: if (!($query->num_rows() === 1)) { goto rfAW_; } goto UEVxQ; Cn2Mw: $this->clear_remember_code($identity); goto NKI65; NKI65: goto oL4zP; goto MR9NI; mi11R: $this->set_error("login_unsuccessful_not_active"); goto Z47Tv; UEVxQ: $user = $query->row(); goto aWwPx; zvWRC: if (!$this->config->item("remember_users", "ion_auth")) { goto ridDs; } goto XEnxk; iXPJS: $this->rehash_password_if_needed($user->password, $identity, $password); goto R4SL3; OZODv: return FALSE; goto i2ZDM; a3Ak5: $this->trigger_events("post_login_unsuccessful"); goto YI8hD; qYUVX: $this->trigger_events("extra_where"); goto wOB5j; GFGnN: if (!($user->active == 0)) { goto AjkXb; } goto bPaMB; YI8hD: $this->set_error("login_timeout"); goto HEYNv; F9epz: ridDs: goto iXPJS; HEYNv: return FALSE; goto u37N0; R4SL3: $this->session->sess_regenerate(FALSE); goto INY3k; OrYkx: $this->hash_password($password); goto a3Ak5; bPaMB: $this->trigger_events("post_login_unsuccessful"); goto mi11R; OpLF_: oL4zP: goto F9epz; eWdy3: $this->set_error("login_unsuccessful"); goto coR3L; hBtJM: $this->update_last_login($user->id); goto q2gM2; Z47Tv: return FALSE; goto EjX9r; wZZmd: return TRUE; goto Xmmz9; aWwPx: if (!$this->verify_password($password, $user->password, $identity)) { goto Kcm3O; } goto GFGnN; i2ZDM: I4lUP: goto qYUVX; GQ_nD: $this->increase_login_attempts($identity); goto vwwrS; XEnxk: if ($remember) { goto brqKS; } goto Cn2Mw; MR9NI: brqKS: goto KYCoe; KYCoe: $this->remember_user($identity); goto OpLF_; q2gM2: $this->clear_login_attempts($identity); goto M290P; AskmO: $this->hash_password($password); goto GQ_nD; coR3L: return FALSE; goto YN4rT; QU4PT: $this->set_session($user); goto hBtJM; u37N0: zrMwK: goto vzKmN; lDhYH: $this->set_error("login_unsuccessful"); goto OZODv; EjX9r: AjkXb: goto QU4PT; SyG0A: $this->set_message("login_successful"); goto wZZmd; YN4rT: } public function recheck_session() { goto WZh10; c4d1M: vUjMB: goto OSElz; eANZU: $query = $this->db->select("id")->where([$this->identity_column => $this->session->userdata("identity"), "active" => "1"])->limit(1)->order_by("id", "desc")->get($this->tables["users"]); goto u7C41; u7C41: if ($query->num_rows() === 1) { goto BDfBT; } goto G8eu5; YYJn4: $last_login = $this->session->userdata("last_check"); goto Qoxeu; w9fKU: $this->session->set_userdata("last_check", time()); goto TRnOD; OSElz: return (bool) $this->session->userdata("identity"); goto OoAqZ; TRnOD: sLcoy: goto abp3Y; Jw3d4: BDfBT: goto w9fKU; LfAUY: $this->session->unset_userdata([$identity, "id", "user_id"]); goto PzL1k; PzL1k: return FALSE; goto t4Vjo; Qoxeu: if (!($last_login + $recheck < time())) { goto FxuSk; } goto eANZU; t4Vjo: goto sLcoy; goto Jw3d4; G8eu5: $this->trigger_events("logout"); goto u6h8K; u6h8K: $identity = $this->config->item("identity", "ion_auth"); goto LfAUY; abp3Y: FxuSk: goto c4d1M; WZh10: $recheck = NULL !== $this->config->item("recheck_timer", "ion_auth") ? $this->config->item("recheck_timer", "ion_auth") : 0; goto D4rn8; D4rn8: if (!($recheck !== 0)) { goto vUjMB; } goto YYJn4; OoAqZ: } public function is_max_login_attempts_exceeded($identity, $ip_address = NULL) { goto c_e9b; mHqXN: if (!($max_attempts > 0)) { goto hjfGz; } goto ZjaoL; c_e9b: if (!$this->config->item("track_login_attempts", "ion_auth")) { goto HEP63; } goto mNYb8; ZjaoL: $attempts = $this->get_attempts_num($identity, $ip_address); goto dJWj5; mNYb8: $max_attempts = $this->config->item("maximum_login_attempts", "ion_auth"); goto mHqXN; M8IyV: return FALSE; goto iZ2ZS; dJWj5: return $attempts >= $max_attempts; goto Zp0nD; qLhnA: HEP63: goto M8IyV; Zp0nD: hjfGz: goto qLhnA; iZ2ZS: } public function get_attempts_num($identity, $ip_address = NULL) { goto W4gXc; uLHuk: if (isset($ip_address)) { goto Fj806; } goto Qwync; ZLGIg: $this->db->where("ip_address", $ip_address); goto oc8TC; LiVCY: $this->db->where("login", $identity); goto CIimT; Qwync: $ip_address = $this->input->ip_address(); goto p21Xo; p21Xo: Fj806: goto ZLGIg; lNHu7: $this->db->where("time >", time() - $this->config->item("lockout_time", "ion_auth"), FALSE); goto Qc0iw; UCser: return $qres->num_rows(); goto WLPdd; W4gXc: if (!$this->config->item("track_login_attempts", "ion_auth")) { goto EYYUe; } goto abUDg; CIimT: if (!$this->config->item("track_login_ip_address", "ion_auth")) { goto dFk3Y; } goto uLHuk; HNx_W: return 0; goto hQbq1; Qc0iw: $qres = $this->db->get($this->tables["login_attempts"]); goto UCser; oc8TC: dFk3Y: goto lNHu7; abUDg: $this->db->select("1", FALSE); goto LiVCY; WLPdd: EYYUe: goto HNx_W; hQbq1: } public function get_last_attempt_time($identity, $ip_address = NULL) { goto f3m5y; KllCZ: if (isset($ip_address)) { goto FDpOg; } goto eOHtw; dXn9c: G2Fn6: goto LpfqZ; vAnNq: $qres = $this->db->get($this->tables["login_attempts"], 1); goto kxKHh; iYzjv: return 0; goto RH1NZ; etZcQ: if (!$this->config->item("track_login_ip_address", "ion_auth")) { goto QE4NT; } goto KllCZ; WN0ve: $this->db->select("time"); goto qMxlV; AHmdd: FDpOg: goto AVLXb; AVLXb: $this->db->where("ip_address", $ip_address); goto VnnXh; eOHtw: $ip_address = $this->input->ip_address(); goto AHmdd; f3m5y: if (!$this->config->item("track_login_attempts", "ion_auth")) { goto yygEN; } goto WN0ve; qMxlV: $this->db->where("login", $identity); goto etZcQ; LpfqZ: yygEN: goto iYzjv; OHaiU: $this->db->order_by("id", "desc"); goto vAnNq; VnnXh: QE4NT: goto OHaiU; kxKHh: if (!($qres->num_rows() > 0)) { goto G2Fn6; } goto hWOLQ; hWOLQ: return $qres->row()->time; goto dXn9c; RH1NZ: } public function get_last_attempt_ip($identity) { goto A3XNV; MnKal: eG7ze: goto YRaHW; w8SL0: if (!($qres->num_rows() > 0)) { goto eG7ze; } goto Cbh2b; mxgc8: return ''; goto E2cbb; Yd6XL: $qres = $this->db->get($this->tables["login_attempts"], 1); goto w8SL0; Cbh2b: return $qres->row()->ip_address; goto MnKal; vfe5c: $this->db->order_by("id", "desc"); goto Yd6XL; sth5Q: $this->db->select("ip_address"); goto F_yf3; F_yf3: $this->db->where("login", $identity); goto vfe5c; A3XNV: if (!($this->config->item("track_login_attempts", "ion_auth") && $this->config->item("track_login_ip_address", "ion_auth"))) { goto M10Le; } goto sth5Q; YRaHW: M10Le: goto mxgc8; E2cbb: } public function increase_login_attempts($identity) { goto XWAZn; NPUeO: return $this->db->insert($this->tables["login_attempts"], $data); goto UlZ2y; JqG3g: return FALSE; goto yhi5W; o1rpx: q2nbh: goto NPUeO; LhiVf: if (!$this->config->item("track_login_ip_address", "ion_auth")) { goto q2nbh; } goto gNPes; UlZ2y: BDwDL: goto JqG3g; gNPes: $data["ip_address"] = $this->input->ip_address(); goto o1rpx; Bc4jQ: $data = ["ip_address" => '', "login" => $identity, "time" => time()]; goto LhiVf; XWAZn: if (!$this->config->item("track_login_attempts", "ion_auth")) { goto BDwDL; } goto Bc4jQ; yhi5W: } public function clear_login_attempts($identity, $old_attempts_expire_period = 86400, $ip_address = NULL) { goto w1cW8; w1cW8: if (!$this->config->item("track_login_attempts", "ion_auth")) { goto RFrnh; } goto CNoPF; B82Vq: return FALSE; goto ET_AB; YQ1Pc: return $this->db->delete($this->tables["login_attempts"]); goto btfJa; L34yI: $this->db->or_where("time <", time() - $old_attempts_expire_period, FALSE); goto YQ1Pc; vYEVY: WoyLv: goto L34yI; ryw25: if (isset($ip_address)) { goto c16O2; } goto CukIk; CNoPF: $old_attempts_expire_period = max($old_attempts_expire_period, $this->config->item("lockout_time", "ion_auth")); goto wrUHd; ashVN: $this->db->where("ip_address", $ip_address); goto vYEVY; CukIk: $ip_address = $this->input->ip_address(); goto mJQ05; wrUHd: $this->db->where("login", $identity); goto Xpt20; btfJa: RFrnh: goto B82Vq; mJQ05: c16O2: goto ashVN; Xpt20: if (!$this->config->item("track_login_ip_address", "ion_auth")) { goto WoyLv; } goto ryw25; ET_AB: } public function limit($limit) { goto DH0hz; UawS9: return $this; goto iXMgY; DH0hz: $this->trigger_events("limit"); goto YxBps; YxBps: $this->_ion_limit = $limit; goto UawS9; iXMgY: } public function offset($offset) { goto jwL73; hv0gB: return $this; goto DNiI2; uF61v: $this->_ion_offset = $offset; goto hv0gB; jwL73: $this->trigger_events("offset"); goto uF61v; DNiI2: } public function where($where, $value = NULL) { goto ekCJr; FJ674: n8aEX: goto z2cbd; PGgax: $where = [$where => $value]; goto FJ674; q25a0: return $this; goto IDo2I; z2cbd: array_push($this->_ion_where, $where); goto q25a0; ekCJr: $this->trigger_events("where"); goto RWvps; RWvps: if (is_array($where)) { goto n8aEX; } goto PGgax; IDo2I: } public function like($like, $value = NULL, $position = "both") { goto n9WD1; n9WD1: $this->trigger_events("like"); goto wtOXg; wtOXg: array_push($this->_ion_like, ["like" => $like, "value" => $value, "position" => $position]); goto DRTJ4; DRTJ4: return $this; goto BCALw; BCALw: } public function select($select) { goto rf30_; rf30_: $this->trigger_events("select"); goto Vi0DN; qVC1o: return $this; goto eM9zN; Vi0DN: $this->_ion_select[] = $select; goto qVC1o; eM9zN: } public function order_by($by, $order = "desc") { goto D9VlF; RwrpP: return $this; goto Sqxli; F75b8: $this->_ion_order_by = $by; goto UkLrS; UkLrS: $this->_ion_order = $order; goto RwrpP; D9VlF: $this->trigger_events("order_by"); goto F75b8; Sqxli: } public function row() { goto R2cSR; lnzxz: $row = $this->response->row(); goto gwddZ; R2cSR: $this->trigger_events("row"); goto lnzxz; gwddZ: return $row; goto rDx4h; rDx4h: } public function row_array() { goto f3EA8; f3EA8: $this->trigger_events(["row", "row_array"]); goto ZYk0T; ZYk0T: $row = $this->response->row_array(); goto zAIAr; zAIAr: return $row; goto DJxc4; DJxc4: } public function result() { goto v5bJW; Om_rz: $result = $this->response->result(); goto ZlTrJ; v5bJW: $this->trigger_events("result"); goto Om_rz; ZlTrJ: return $result; goto Tar1y; Tar1y: } public function result_array() { goto vaG1B; CvAhN: return $result; goto AqfQG; R5cbA: $result = $this->response->result_array(); goto CvAhN; vaG1B: $this->trigger_events(["result", "result_array"]); goto R5cbA; AqfQG: } public function num_rows() { goto WszbE; a0JHY: return $result; goto BIO5a; TDPU3: $result = $this->response->num_rows(); goto a0JHY; WszbE: $this->trigger_events(["num_rows"]); goto TDPU3; BIO5a: } public function users($groups = NULL) { goto AX4m5; mJlJt: $this->db->select([$this->tables["users"] . ".*", $this->tables["users"] . ".id as id", $this->tables["users"] . ".id as user_id"]); goto HFviN; l3kyr: $this->db->distinct(); goto Ym8nO; tamq9: if (empty($group_ids)) { goto t640x; } goto VMEV6; cS5KE: $this->db->limit($this->_ion_limit, $this->_ion_offset); goto XA6Of; zNwC2: PwVxi: goto m78FN; GjJET: I6fWa: goto m1810; IBDsP: if (!(isset($groups) && !empty($groups))) { goto uUEue; } goto l3kyr; GDuoF: t640x: goto wfDuW; M19JB: if (!isset($this->_ion_limit)) { goto Joead; } goto Ouemd; ZewNm: return $this; goto P19jc; yiQjx: $this->db->order_by($this->_ion_order_by, $this->_ion_order); goto Ex8PC; hAo13: $this->_ion_where = []; goto zNwC2; m1810: $this->_ion_select = []; goto d_4h5; fW3nG: $this->db->where_in($this->tables["groups"] . ".name", $group_names); goto VfilB; wLH_f: roUPL: goto ifQ2j; NfbqQ: IC8GE: goto IBDsP; rstFM: $this->db->join($this->tables["groups"], $this->tables["users_groups"] . "." . $this->join["groups"] . " = " . $this->tables["groups"] . ".id", "inner"); goto fW3nG; WF4d_: rrndl: goto AvF_n; d_4h5: dYGMl: goto GCGXK; vuzFx: $or_where_in = !empty($group_ids) && !empty($group_names) ? "or_where_in" : "where_in"; goto rJkES; Ia7mH: $this->_ion_like = []; goto WF4d_; KajyI: k9r5H: goto rR3DN; g8_EB: ky1ZK: goto Ia7mH; ZGQub: foreach ($this->_ion_like as $like) { $this->db->or_like($like["like"], $like["value"], $like["position"]); u9vch: } goto g8_EB; AvF_n: if (isset($this->_ion_limit) && isset($this->_ion_offset)) { goto EPQfm; } goto M19JB; ifQ2j: if (!(isset($this->_ion_order_by) && isset($this->_ion_order))) { goto k9r5H; } goto yiQjx; ZelJS: $this->_ion_offset = NULL; goto wLH_f; Ouemd: $this->db->limit($this->_ion_limit); goto PfYRS; m78FN: if (!(isset($this->_ion_like) && !empty($this->_ion_like))) { goto rrndl; } goto ZGQub; VMEV6: $this->db->{$or_where_in}($this->tables["users_groups"] . "." . $this->join["groups"], $group_ids); goto GDuoF; MUDgG: foreach ($groups as $group) { goto Aqmx2; EdJQs: $group_names[] = $group; goto bovbt; CVzpo: PkXY3: goto Db86q; Aqmx2: if (is_numeric($group)) { goto PkXY3; } goto EdJQs; bovbt: goto arLX3; goto CVzpo; Db86q: $group_ids[] = $group; goto H5W4d; H5W4d: arLX3: goto UQcfw; UQcfw: RagLD: goto KzPaD; KzPaD: } goto j7cRi; XA6Of: $this->_ion_limit = NULL; goto ZelJS; WgAI2: if (is_array($groups)) { goto IC8GE; } goto qcARt; qcARt: $groups = [$groups]; goto NfbqQ; j7cRi: VGadx: goto vuzFx; GCGXK: if (!isset($groups)) { goto QjX8g; } goto WgAI2; lDsHG: if (isset($this->_ion_select) && !empty($this->_ion_select)) { goto XOtVc; } goto mJlJt; gMqCe: XOtVc: goto X4SmS; eSxDd: $group_names = []; goto MUDgG; W6l9K: foreach ($this->_ion_where as $where) { $this->db->where($where); jNuCV: } goto HdOcY; AX4m5: $this->trigger_events("users"); goto lDsHG; glIAA: EPQfm: goto cS5KE; n7pd5: $group_ids = []; goto eSxDd; PfYRS: $this->_ion_limit = NULL; goto Q1Jgb; HFviN: goto dYGMl; goto gMqCe; Q1Jgb: Joead: goto ExveS; eWx3M: $this->trigger_events("extra_where"); goto DFGrP; ExveS: goto roUPL; goto glIAA; DFGrP: if (!(isset($this->_ion_where) && !empty($this->_ion_where))) { goto PwVxi; } goto W6l9K; rR3DN: $this->response = $this->db->get($this->tables["users"]); goto ZewNm; g1caO: $this->_ion_order_by = NULL; goto KajyI; HdOcY: itIIF: goto hAo13; Ex8PC: $this->_ion_order = NULL; goto g1caO; Ym8nO: $this->db->join($this->tables["users_groups"], $this->tables["users_groups"] . "." . $this->join["users"] . "=" . $this->tables["users"] . ".id", "inner"); goto WPQZU; wfDuW: QjX8g: goto eWx3M; WPQZU: uUEue: goto n7pd5; VfilB: Q2n8_: goto tamq9; rJkES: if (empty($group_names)) { goto Q2n8_; } goto rstFM; X4SmS: foreach ($this->_ion_select as $select) { $this->db->select($select); qBUoE: } goto GjJET; P19jc: } public function user($id = NULL) { goto GIMn9; IhbW1: $this->order_by($this->tables["users"] . ".id", "desc"); goto pMA08; pMA08: $this->where($this->tables["users"] . ".id", $id); goto nT9Jy; hDUeq: $id = isset($id) ? $id : $this->session->userdata("user_id"); goto c2zyE; GIMn9: $this->trigger_events("user"); goto hDUeq; nT9Jy: $this->users(); goto GbFdR; GbFdR: return $this; goto uyRzZ; c2zyE: $this->limit(1); goto IhbW1; uyRzZ: } public function get_users_groups($id = FALSE) { goto EzSB0; EzSB0: $this->trigger_events("get_users_group"); goto zzN1o; zzN1o: $id || ($id = $this->session->userdata("user_id")); goto TnWha; TnWha: return $this->db->select($this->tables["users_groups"] . "." . $this->join["groups"] . " as id, " . $this->tables["groups"] . ".name, " . $this->tables["groups"] . ".description")->where($this->tables["users_groups"] . "." . $this->join["users"], $id)->join($this->tables["groups"], $this->tables["users_groups"] . "." . $this->join["groups"] . "=" . $this->tables["groups"] . ".id")->get($this->tables["users_groups"]); goto XPBAD; XPBAD: } public function in_group($check_group, $id = FALSE, $check_all = FALSE) { goto C3YLs; ebQSm: DTAUR: goto RDxDH; XYSJp: $groups_array = $this->_cache_user_in_group[$id]; goto ebQSm; ArphN: if (is_array($check_group)) { goto EbGF5; } goto cUSZd; C3YLs: $this->trigger_events("in_group"); goto kW1K5; xio_3: $groups_array = []; goto aZsp6; YBuHm: hm0NF: goto XYSJp; KdAz7: goto DTAUR; goto YBuHm; QbamW: return $check_all; goto T3lBF; APhMY: $users_groups = $this->get_users_groups($id)->result(); goto xio_3; pFbYy: if (isset($this->_cache_user_in_group[$id])) { goto hm0NF; } goto APhMY; pGpTo: $this->_cache_user_in_group[$id] = $groups_array; goto KdAz7; cUSZd: $check_group = [$check_group]; goto pQxDr; Nk2wd: OqQvw: goto pGpTo; D6ybs: VzHnO: goto QbamW; kW1K5: $id || ($id = $this->session->userdata("user_id")); goto ArphN; pQxDr: EbGF5: goto pFbYy; aZsp6: foreach ($users_groups as $group) { $groups_array[$group->id] = $group->name; HApGU: } goto Nk2wd; RDxDH: foreach ($check_group as $key => $value) { goto KxFKi; dktE4: TogiP: goto qpu30; CcIFE: return !$check_all; goto dktE4; qpu30: fEqAo: goto o5NfJ; M_HMG: if (!(in_array($value, $groups) xor $check_all)) { goto TogiP; } goto CcIFE; KxFKi: $groups = is_numeric($value) ? array_keys($groups_array) : $groups_array; goto M_HMG; o5NfJ: } goto D6ybs; T3lBF: } public function add_to_group($group_ids, $user_id = FALSE) { goto b2RjB; gwyX2: $user_id || ($user_id = $this->session->userdata("user_id")); goto cRYwb; KFqyg: foreach ($group_ids as $group_id) { goto IzxJU; syiup: $this->_cache_user_in_group[$user_id][$group_id] = $group_name; goto x_Vdu; IzxJU: if (!$this->db->insert($this->tables["users_groups"], [$this->join["groups"] => (float) $group_id, $this->join["users"] => (float) $user_id])) { goto LJ9LV; } goto pIsBm; gCSVE: M8Y7r: goto YmSY7; yGlEr: $group_name = $group[0]->name; goto drXu3; xj2UK: nTLla: goto rLxD1; L0YfS: LJ9LV: goto xj2UK; WeMVt: goto GH3R0; goto gCSVE; drXu3: $this->_cache_groups[$group_id] = $group_name; goto WeMVt; jcB2a: $group = $this->group($group_id)->result(); goto yGlEr; x_Vdu: $return++; goto L0YfS; pIsBm: if (isset($this->_cache_groups[$group_id])) { goto M8Y7r; } goto jcB2a; h9OxV: GH3R0: goto syiup; YmSY7: $group_name = $this->_cache_groups[$group_id]; goto h9OxV; rLxD1: } goto GDUxY; GDUxY: sI7D7: goto bXRAK; bXRAK: return $return; goto A6dRL; cRYwb: if (is_array($group_ids)) { goto I2S_i; } goto veekP; WXZ99: I2S_i: goto SoP_m; SoP_m: $return = 0; goto KFqyg; veekP: $group_ids = [$group_ids]; goto WXZ99; b2RjB: $this->trigger_events("add_to_group"); goto gwyX2; A6dRL: } public function remove_from_group($group_ids = FALSE, $user_id = FALSE) { goto z_jG9; p5R5s: foreach ($group_ids as $group_id) { goto jrB2r; jrB2r: $this->db->delete($this->tables["users_groups"], [$this->join["groups"] => (float) $group_id, $this->join["users"] => (float) $user_id]); goto Cl4qG; Cl4qG: if (!(isset($this->_cache_user_in_group[$user_id]) && isset($this->_cache_user_in_group[$user_id][$group_id]))) { goto FZghj; } goto RJJ0K; QC6JT: j5wv0: goto ikStf; RJJ0K: unset($this->_cache_user_in_group[$user_id][$group_id]); goto XKAHl; XKAHl: FZghj: goto QC6JT; ikStf: } goto z1QgQ; hiPXE: $group_ids = [$group_ids]; goto lXBzn; z1QgQ: mm0gs: goto j2UuE; QVuY_: if (!empty($group_ids)) { goto VkRHX; } goto UBmay; LQFUb: y8K5F: goto QVuY_; lXBzn: ooH03: goto p5R5s; cN6zu: NM5nI: goto n3Wne; n3Wne: goto Zk7kP; goto lSHf_; EMWZy: if (is_array($group_ids)) { goto ooH03; } goto hiPXE; ge3b3: return $return; goto i0bp7; mKvR_: return FALSE; goto LQFUb; lSHf_: VkRHX: goto EMWZy; UBmay: if (!($return = $this->db->delete($this->tables["users_groups"], [$this->join["users"] => (float) $user_id]))) { goto NM5nI; } goto R2Qxq; dxEM1: if (!empty($user_id)) { goto y8K5F; } goto mKvR_; j2UuE: $return = TRUE; goto Qr9Nw; R2Qxq: $this->_cache_user_in_group[$user_id] = []; goto cN6zu; z_jG9: $this->trigger_events("remove_from_group"); goto dxEM1; Qr9Nw: Zk7kP: goto ge3b3; i0bp7: } public function groups() { goto MSgyY; stEQR: $this->db->limit($this->_ion_limit, $this->_ion_offset); goto jk61i; hYYWv: $this->_ion_where = []; goto bhZvH; OIJ5y: goto tzWrM; goto SHYRk; ALjuh: if (!(isset($this->_ion_order_by) && isset($this->_ion_order))) { goto tGhWM; } goto R708N; I4off: if (isset($this->_ion_limit) && isset($this->_ion_offset)) { goto mR2vH; } goto Gu4f2; bhZvH: FcaFr: goto I4off; RQTzS: tzWrM: goto ALjuh; y8fie: $this->_ion_limit = NULL; goto iD62b; Gu4f2: if (!isset($this->_ion_limit)) { goto xwmzK; } goto yGEFj; iD62b: xwmzK: goto OIJ5y; Kcf6J: tGhWM: goto IKd1H; xuKTj: $this->_ion_offset = NULL; goto RQTzS; paPXd: return $this; goto h0Eqk; DhC_G: if (!(isset($this->_ion_where) && !empty($this->_ion_where))) { goto FcaFr; } goto NmL6W; NmL6W: foreach ($this->_ion_where as $where) { $this->db->where($where); t5Wtw: } goto DcWM0; SHYRk: mR2vH: goto stEQR; IKd1H: $this->response = $this->db->get($this->tables["groups"]); goto paPXd; jk61i: $this->_ion_limit = NULL; goto xuKTj; R708N: $this->db->order_by($this->_ion_order_by, $this->_ion_order); goto Kcf6J; MSgyY: $this->trigger_events("groups"); goto DhC_G; yGEFj: $this->db->limit($this->_ion_limit); goto y8fie; DcWM0: ySmQP: goto hYYWv; h0Eqk: } public function group($id = NULL) { goto BBOnL; BBOnL: $this->trigger_events("group"); goto dn822; mHYP6: $this->limit(1); goto mVQc6; B5t9m: WeCAr: goto mHYP6; dn822: if (!isset($id)) { goto WeCAr; } goto GE69_; GE69_: $this->where($this->tables["groups"] . ".id", $id); goto B5t9m; W96br: return $this->groups(); goto EZa5k; mVQc6: $this->order_by("id", "desc"); goto W96br; EZa5k: } public function update($id, array $data) { goto igyD4; Q3Zbz: $this->trigger_events(["post_update_user", "post_update_user_unsuccessful"]); goto DRG0N; jbhy8: unset($data["password"]); goto y9jQK; xjigP: UySe9: goto lKMbi; xU0c3: return FALSE; goto e1QHT; HPjO0: $this->set_error("account_creation_duplicate_identity"); goto DuANW; SW4ny: $this->db->trans_begin(); goto yd1BI; ez7qf: $this->set_error("update_unsuccessful"); goto WzZ0j; DuANW: $this->trigger_events(["post_update_user", "post_update_user_unsuccessful"]); goto mhpCr; w5QXT: $this->db->trans_commit(); goto Wl8mt; mhpCr: $this->set_error("update_unsuccessful"); goto xU0c3; IiVYb: if (!(array_key_exists($this->identity_column, $data) || array_key_exists("password", $data) || array_key_exists("email", $data))) { goto zP8WL; } goto a4Km9; d26oO: $this->db->trans_rollback(); goto Q3Zbz; hVgfX: $this->trigger_events("extra_where"); goto N4I_q; AJC8K: $this->db->trans_rollback(); goto HPjO0; rfRiQ: if (!($data["password"] === FALSE)) { goto dV5_5; } goto OWq0R; x9Oa6: $user = $this->user($id)->row(); goto SW4ny; PfLYd: return TRUE; goto t1wR4; D_IG9: s8gsm: goto w5QXT; zA2vw: zP8WL: goto hVgfX; e1QHT: Ak0kK: goto WYi0x; WzZ0j: return FALSE; goto qAUPl; DRG0N: $this->set_error("update_unsuccessful"); goto fiScr; a4Km9: if (!array_key_exists("password", $data)) { goto xCpxt; } goto s7ogR; WYi0x: $data = $this->_filter_data($this->tables["users"], $data); goto IiVYb; s7ogR: if (!empty($data["password"])) { goto UySe9; } goto jbhy8; y9jQK: goto IYSFs; goto xjigP; QE3dA: $this->set_message("update_successful"); goto PfLYd; igyD4: $this->trigger_events("pre_update_user"); goto x9Oa6; u3vk6: IYSFs: goto ywSnZ; Wl8mt: $this->trigger_events(["post_update_user", "post_update_user_successful"]); goto QE3dA; lKMbi: $data["password"] = $this->hash_password($data["password"], $user->{$this->identity_column}); goto rfRiQ; ywSnZ: xCpxt: goto zA2vw; N4I_q: $this->db->update($this->tables["users"], $data, ["id" => $user->id]); goto h4Vx2; OWq0R: $this->db->trans_rollback(); goto X0q7K; h4Vx2: if (!($this->db->trans_status() === FALSE)) { goto s8gsm; } goto d26oO; X0q7K: $this->trigger_events(["post_update_user", "post_update_user_unsuccessful"]); goto ez7qf; qAUPl: dV5_5: goto u3vk6; fiScr: return FALSE; goto D_IG9; yd1BI: if (!(array_key_exists($this->identity_column, $data) && $this->identity_check($data[$this->identity_column]) && $user->{$this->identity_column} !== $data[$this->identity_column])) { goto Ak0kK; } goto AJC8K; t1wR4: } public function delete_user($id) { goto rh_bE; OJO5v: return FALSE; goto oivQL; egr08: $this->trigger_events(["post_delete_user", "post_delete_user_successful"]); goto iBNek; bZN1m: $this->trigger_events(["post_delete_user", "post_delete_user_unsuccessful"]); goto OZQyQ; rh_bE: $this->trigger_events("pre_delete_user"); goto vXhsE; nzEll: $this->db->trans_rollback(); goto bZN1m; oivQL: ImLUA: goto hvo9E; m1ZI5: if (!($this->db->trans_status() === FALSE)) { goto ImLUA; } goto nzEll; GX2pp: $this->db->delete($this->tables["users"], ["id" => $id]); goto m1ZI5; vXhsE: $this->db->trans_begin(); goto U34Rm; iBNek: $this->set_message("delete_successful"); goto UVprM; hvo9E: $this->db->trans_commit(); goto egr08; U34Rm: $this->remove_from_group(NULL, $id); goto GX2pp; OZQyQ: $this->set_error("delete_unsuccessful"); goto OJO5v; UVprM: return TRUE; goto QmiKh; QmiKh: } public function update_last_login($id) { goto ixjkY; iRIYM: $this->db->update($this->tables["users"], ["last_login" => time()], ["id" => $id]); goto dUJtl; TrqTJ: $this->load->helper("date"); goto MqDxQ; ixjkY: $this->trigger_events("update_last_login"); goto TrqTJ; MqDxQ: $this->trigger_events("extra_where"); goto iRIYM; dUJtl: return $this->db->affected_rows() == 1; goto VjkpX; VjkpX: } public function set_lang($lang = "en") { goto X3_D2; qdxkU: return TRUE; goto DgtqA; tTUSa: he8cL: goto g5SQR; UVn5S: if ($this->config->item("user_expire", "ion_auth") === 0) { goto P0gue; } goto FfnQj; X3_D2: $this->trigger_events("set_lang"); goto UVn5S; VKChs: $expire = self::MAX_COOKIE_LIFETIME; goto tTUSa; zZ_0Q: goto he8cL; goto JQb1g; FfnQj: $expire = $this->config->item("user_expire", "ion_auth"); goto zZ_0Q; JQb1g: P0gue: goto VKChs; g5SQR: set_cookie(["name" => "lang_code", "value" => $lang, "expire" => $expire]); goto qdxkU; DgtqA: } public function set_session($user) { goto ik7xh; L17I6: $this->trigger_events("post_set_session"); goto CxaFO; CxaFO: return TRUE; goto CE8v1; zg1Di: $this->session->set_userdata($session_data); goto L17I6; ik7xh: $this->trigger_events("pre_set_session"); goto Uolbi; Uolbi: $session_data = ["identity" => $user->{$this->identity_column}, $this->identity_column => $user->{$this->identity_column}, "email" => $user->email, "user_id" => $user->id, "old_last_login" => $user->last_login, "last_check" => time()]; goto zg1Di; CE8v1: } public function remember_user($identity) { goto YmGIQ; q6G8F: $expire = self::MAX_COOKIE_LIFETIME; goto y73in; NAyUZ: $this->trigger_events(["post_remember_user", "remember_user_successful"]); goto Bshur; N7Dlk: ff3Wl: goto q6G8F; Bshur: return TRUE; goto hoSUd; zjk_g: if (!$token->validator_hashed) { goto hfx_B; } goto RhjD1; QU3WF: hfx_B: goto A27RF; SpbEu: goto etGIt; goto N7Dlk; O7uof: set_cookie(["name" => $this->config->item("remember_cookie_name", "ion_auth"), "value" => $token->user_code, "expire" => $expire]); goto NAyUZ; Ien_Y: $expire = $this->config->item("user_expire", "ion_auth"); goto SpbEu; gGATT: return FALSE; goto Os4u4; r7qkM: if (!($this->db->affected_rows() > -1)) { goto ZSabb; } goto stLqu; YmGIQ: $this->trigger_events("pre_remember_user"); goto rN2ua; hoSUd: ZSabb: goto QU3WF; A27RF: $this->trigger_events(["post_remember_user", "remember_user_unsuccessful"]); goto gGATT; FDbua: return FALSE; goto l8CMl; y73in: etGIt: goto O7uof; l7AgL: $token = $this->_generate_selector_validator_couple(); goto zjk_g; l8CMl: wy801: goto l7AgL; stLqu: if ($this->config->item("user_expire", "ion_auth") === 0) { goto ff3Wl; } goto Ien_Y; RhjD1: $this->db->update($this->tables["users"], ["remember_selector" => $token->selector, "remember_code" => $token->validator_hashed], [$this->identity_column => $identity]); goto r7qkM; rN2ua: if ($identity) { goto wy801; } goto FDbua; Os4u4: } public function login_remembered_user() { goto OCa55; z03v9: $this->session->sess_regenerate(FALSE); goto rolxj; pcN1s: $identity = $user->{$this->identity_column}; goto qZbRB; qlv5R: wGX5b: goto XPZ0c; rolxj: $this->trigger_events(["post_login_remembered_user", "post_login_remembered_user_successful"]); goto sFOZL; Vtqww: $remember_cookie = get_cookie($this->config->item("remember_cookie_name", "ion_auth")); goto c66xp; c66xp: $token = $this->_retrieve_selector_validator_couple($remember_cookie); goto Q2nnj; ER68j: $this->clear_forgotten_password_code($identity); goto tCLSp; UBt1Q: $user = $query->row(); goto pcN1s; nvD7U: $this->trigger_events(["post_login_remembered_user", "post_login_remembered_user_unsuccessful"]); goto lj20V; XvfjI: pfUD0: goto z03v9; gyhoe: delete_cookie($this->config->item("remember_cookie_name", "ion_auth")); goto AAUQi; sWvrO: return FALSE; goto ZQOHq; H5mxH: $this->set_session($user); goto ER68j; AAUQi: $this->trigger_events(["post_login_remembered_user", "post_login_remembered_user_unsuccessful"]); goto sWvrO; lrgS5: $this->update_last_login($user->id); goto H5mxH; OCa55: $this->trigger_events("pre_login_remembered_user"); goto Vtqww; sFOZL: return TRUE; goto eVeFy; tCLSp: if (!$this->config->item("user_extend_on_login", "ion_auth")) { goto pfUD0; } goto s8_Mt; s8_Mt: $this->remember_user($identity); goto XvfjI; ovHSj: if (!($query->num_rows() === 1)) { goto aj64t; } goto UBt1Q; XPZ0c: $this->trigger_events("extra_where"); goto WBYfV; n17jr: aj64t: goto gyhoe; qZbRB: if (!$this->verify_password($token->validator, $user->remember_code, $identity)) { goto ZFY3w; } goto lrgS5; WBYfV: $query = $this->db->select($this->identity_column . ", id, email, remember_code, last_login")->where("remember_selector", $token->selector)->where("active", 1)->limit(1)->get($this->tables["users"]); goto ovHSj; Q2nnj: if (!($token === FALSE)) { goto wGX5b; } goto nvD7U; eVeFy: ZFY3w: goto n17jr; lj20V: return FALSE; goto qlv5R; ZQOHq: } public function create_group($group_name = FALSE, $group_description = '', $additional_data = array()) { goto qPXMX; U7sba: $this->set_error("group_name_required"); goto i1zQl; LM9gn: VPCKn: goto fx98d; xSBBy: v5i5T: goto F_m5r; F5Fvd: $group_id = $this->db->insert_id($this->tables["groups"] . "_id_seq"); goto O3oFX; O3oFX: $this->set_message("group_creation_successful"); goto qm7hL; RRH7Q: if (empty($additional_data)) { goto wBK0E; } goto uHPKz; mCzUs: if (!($existing_group !== 0)) { goto v5i5T; } goto aYBzZ; qm7hL: return $group_id; goto NTWHA; Y8E9L: $this->db->insert($this->tables["groups"], $data); goto F5Fvd; OzsUi: wBK0E: goto l2EMZ; pLvex: return FALSE; goto xSBBy; aYBzZ: $this->set_error("group_already_exists"); goto pLvex; qPXMX: if ($group_name) { goto VPCKn; } goto U7sba; i1zQl: return FALSE; goto LM9gn; F_m5r: $data = ["name" => $group_name, "description" => $group_description]; goto RRH7Q; fx98d: $existing_group = $this->db->get_where($this->tables["groups"], ["name" => $group_name])->num_rows(); goto mCzUs; l2EMZ: $this->trigger_events("extra_group_set"); goto Y8E9L; uHPKz: $data = array_merge($this->_filter_data($this->tables["groups"], $additional_data), $data); goto OzsUi; NTWHA: } public function update_group($group_id = FALSE, $group_name = FALSE, $additional_data = array()) { goto CTNic; uwA4T: return TRUE; goto D952j; JbSjr: return FALSE; goto MPLOH; yMCGG: return FALSE; goto U4BB1; kKA6T: if (!($this->config->item("admin_group", "ion_auth") === $group->name && $group_name !== $group->name)) { goto x5sIP; } goto UzlNl; Cjwxw: l3BOI: goto TqVUf; AybCz: $this->db->update($this->tables["groups"], $data, ["id" => $group_id]); goto MHpLM; xRx0Q: $data = []; goto U3EUW; ow8LF: return FALSE; goto jx87Y; jx87Y: i0zZW: goto xRx0Q; TqVUf: $group = $this->db->get_where($this->tables["groups"], ["id" => $group_id])->row(); goto kKA6T; DwXlt: $data["name"] = $group_name; goto Cjwxw; MHpLM: $this->set_message("group_update_successful"); goto uwA4T; Vg3Qv: if (!(isset($existing_group->id) && $existing_group->id != $group_id)) { goto T6dkE; } goto A0lwZ; TXU9M: UVkeQ: goto AybCz; f9sn7: $data = array_merge($this->_filter_data($this->tables["groups"], $additional_data), $data); goto TXU9M; U4BB1: x5sIP: goto He0Z7; CTNic: if (!empty($group_id)) { goto i0zZW; } goto ow8LF; U3EUW: if (empty($group_name)) { goto l3BOI; } goto zvt1c; zvt1c: $existing_group = $this->db->get_where($this->tables["groups"], ["name" => $group_name])->row(); goto Vg3Qv; A0lwZ: $this->set_error("group_already_exists"); goto JbSjr; MPLOH: T6dkE: goto DwXlt; UzlNl: $this->set_error("group_name_admin_not_alter"); goto yMCGG; He0Z7: if (empty($additional_data)) { goto UVkeQ; } goto f9sn7; D952j: } public function delete_group($group_id = FALSE) { goto p0Sou; qLBCu: $this->trigger_events(["post_delete_group", "post_delete_group_unsuccessful"]); goto Zt3Y5; dKNBt: $this->trigger_events(["post_delete_group", "post_delete_group_successful"]); goto qLp76; AG7W4: $this->db->trans_rollback(); goto qLBCu; L6919: $this->db->delete($this->tables["groups"], ["id" => $group_id]); goto tIetC; abU72: $this->trigger_events("pre_delete_group"); goto sz82y; WL_Rx: KXxl6: goto JFNcv; qLp76: $this->set_message("group_delete_successful"); goto h7H6C; Zt3Y5: $this->set_error("group_delete_unsuccessful"); goto LzI4T; Bsatl: return FALSE; goto WL_Rx; EwSQL: $this->db->trans_commit(); goto dKNBt; LzI4T: return FALSE; goto slGCL; slGCL: IDhV6: goto EwSQL; JFNcv: $group = $this->group($group_id)->row(); goto xCqJp; vSQI1: $this->db->delete($this->tables["users_groups"], [$this->join["groups"] => $group_id]); goto L6919; NDdNC: return FALSE; goto sduvC; sduvC: nNH3O: goto abU72; iHE8t: $this->trigger_events(["post_delete_group", "post_delete_group_notallowed"]); goto E3zRQ; tIetC: if (!($this->db->trans_status() === FALSE)) { goto IDhV6; } goto AG7W4; sz82y: $this->db->trans_begin(); goto vSQI1; xCqJp: if (!($group->name == $this->config->item("admin_group", "ion_auth"))) { goto nNH3O; } goto iHE8t; E3zRQ: $this->set_error("group_delete_notallowed"); goto NDdNC; h7H6C: return TRUE; goto OLGJo; p0Sou: if (!(!$group_id || empty($group_id))) { goto KXxl6; } goto Bsatl; OLGJo: } public function set_hook($event, $name, $class, $method, $arguments) { goto URtUa; URtUa: $this->_ion_hooks->{$event}[$name] = new stdClass(); goto DPnlh; aTKhK: $this->_ion_hooks->{$event}[$name]->arguments = $arguments; goto hrsnq; DPnlh: $this->_ion_hooks->{$event}[$name]->class = $class; goto a2nOo; a2nOo: $this->_ion_hooks->{$event}[$name]->method = $method; goto aTKhK; hrsnq: } public function remove_hook($event, $name) { goto KqCAg; MX_lD: unset($this->_ion_hooks->{$event}[$name]); goto X49NT; X49NT: f7BfG: goto ncQjc; KqCAg: if (!isset($this->_ion_hooks->{$event}[$name])) { goto f7BfG; } goto MX_lD; ncQjc: } public function remove_hooks($event) { goto wtTvU; pXQzA: unset($this->_ion_hooks->{$event}); goto tMYfx; tMYfx: frpkp: goto UQjKK; wtTvU: if (!isset($this->_ion_hooks->{$event})) { goto frpkp; } goto pXQzA; UQjKK: } protected function _call_hook($event, $name) { goto nTFoG; SX8Di: $hook = $this->_ion_hooks->{$event}[$name]; goto Vdsc3; dPvc1: return FALSE; goto wjH44; VZHBJ: BCSxg: goto dPvc1; Vdsc3: return call_user_func_array([$hook->class, $hook->method], $hook->arguments); goto VZHBJ; nTFoG: if (!(isset($this->_ion_hooks->{$event}[$name]) && method_exists($this->_ion_hooks->{$event}[$name]->class, $this->_ion_hooks->{$event}[$name]->method))) { goto BCSxg; } goto SX8Di; wjH44: } public function trigger_events($events) { goto eooIv; Ewyfh: iC6DV: goto vPzPu; vPzPu: d1n87: goto TR_8D; bPH_m: foreach ($events as $event) { $this->trigger_events($event); FriVD: } goto Ewyfh; P8Az_: GPS3W: goto EDSTa; yPzKF: ugva1: goto bPH_m; XPAcy: foreach ($this->_ion_hooks->{$events} as $name => $hook) { $this->_call_hook($events, $name); vckTj: } goto P8Az_; EDSTa: MjOJ_: goto t2Wqc; qC2Jn: if (!(isset($this->_ion_hooks->{$events}) && !empty($this->_ion_hooks->{$events}))) { goto MjOJ_; } goto XPAcy; t2Wqc: goto d1n87; goto yPzKF; eooIv: if (is_array($events) && !empty($events)) { goto ugva1; } goto qC2Jn; TR_8D: } public function set_message_delimiters($start_delimiter, $end_delimiter) { goto FhrwU; Io7ce: return TRUE; goto I9Wfr; ABV0c: $this->message_end_delimiter = $end_delimiter; goto Io7ce; FhrwU: $this->message_start_delimiter = $start_delimiter; goto ABV0c; I9Wfr: } public function set_error_delimiters($start_delimiter, $end_delimiter) { goto pVt38; Z54Io: $this->error_end_delimiter = $end_delimiter; goto U9H14; U9H14: return TRUE; goto VTvBV; pVt38: $this->error_start_delimiter = $start_delimiter; goto Z54Io; VTvBV: } public function set_message($message) { $this->messages[] = $message; return $message; } public function messages() { goto CKzo5; oUWdv: foreach ($this->messages as $message) { goto APE9T; Zooz1: $_output .= $this->message_start_delimiter . $messageLang . $this->message_end_delimiter; goto MkFun; APE9T: $messageLang = $this->lang->line($message) ? $this->lang->line($message) : "##" . $message . "##"; goto Zooz1; MkFun: nTuDI: goto atjRZ; atjRZ: } goto APDdI; VVgln: return $_output; goto VHdfR; CKzo5: $_output = ''; goto oUWdv; APDdI: FBqmM: goto VVgln; VHdfR: } public function messages_array($langify = TRUE) { goto aiJ49; PfTOj: return $_output; goto fNfh4; aiJ49: if ($langify) { goto ei21U; } goto oG3e6; DC_nA: jpQ8b: goto PfTOj; MO6Ir: goto zU32a; goto OvmTh; OvmTh: ei21U: goto alwrz; oG3e6: return $this->messages; goto MO6Ir; z7RPB: foreach ($this->messages as $message) { goto X07u0; lBx_Z: PL90T: goto DQvyD; X07u0: $messageLang = $this->lang->line($message) ? $this->lang->line($message) : "##" . $message . "##"; goto cSaef; cSaef: $_output[] = $this->message_start_delimiter . $messageLang . $this->message_end_delimiter; goto lBx_Z; DQvyD: } goto DC_nA; fNfh4: zU32a: goto N5dFr; alwrz: $_output = []; goto z7RPB; N5dFr: } public function clear_messages() { $this->messages = []; return TRUE; } public function set_error($error) { $this->errors[] = $error; return $error; } public function errors() { goto lJ67f; ph1Zt: return $_output; goto ZSxOV; kJpET: hbJVu: goto ph1Zt; lJ67f: $_output = ''; goto zSFmh; zSFmh: foreach ($this->errors as $error) { goto TN6co; TN6co: $errorLang = $this->lang->line($error) ? $this->lang->line($error) : "##" . $error . "##"; goto WuWUw; ducIX: Cxdjc: goto EFdeQ; WuWUw: $_output .= $this->error_start_delimiter . $errorLang . $this->error_end_delimiter; goto ducIX; EFdeQ: } goto kJpET; ZSxOV: } public function errors_array($langify = TRUE) { goto UbHUQ; UbHUQ: if ($langify) { goto j4vIe; } goto f___d; jSn2T: $_output = []; goto BsE7b; lEzq3: return $_output; goto g2wMS; Yfvxx: g3xTc: goto lEzq3; f___d: return $this->errors; goto dgrOX; g2wMS: NwO7a: goto a_ddU; dgrOX: goto NwO7a; goto pri0A; BsE7b: foreach ($this->errors as $error) { goto SJ0I_; SJ0I_: $errorLang = $this->lang->line($error) ? $this->lang->line($error) : "##" . $error . "##"; goto YTHmA; YTHmA: $_output[] = $this->error_start_delimiter . $errorLang . $this->error_end_delimiter; goto mFJmG; mFJmG: dc9Xz: goto pDHsV; pDHsV: } goto Yfvxx; pri0A: j4vIe: goto jSn2T; a_ddU: } public function clear_errors() { $this->errors = []; return TRUE; } protected function _set_password_db($identity, $password) { goto SiClb; AFJJq: return $this->db->affected_rows() == 1; goto gq7bm; UWcWC: $this->trigger_events("extra_where"); goto kre_X; ujYv1: $data = ["password" => $hash, "remember_code" => NULL, "forgotten_password_code" => NULL, "forgotten_password_time" => NULL]; goto UWcWC; NaZbT: if (!($hash === FALSE)) { goto NDIhF; } goto kMSsx; kMSsx: return FALSE; goto ZJB66; kre_X: $this->db->update($this->tables["users"], $data, [$this->identity_column => $identity]); goto AFJJq; ZJB66: NDIhF: goto ujYv1; SiClb: $hash = $this->hash_password($password, $identity); goto NaZbT; gq7bm: } protected function _filter_data($table, $data) { goto NgRGn; V9Ddo: Kg9a3: goto ef8WE; PKL2K: $columns = $this->db->list_fields($table); goto xFMWh; NgRGn: $filtered_data = []; goto PKL2K; xFMWh: if (!is_array($data)) { goto Kg9a3; } goto QOcjG; wPjAl: J1AIP: goto V9Ddo; ef8WE: return $filtered_data; goto slqiI; QOcjG: foreach ($columns as $column) { goto pzMX4; eQB2k: $filtered_data[$column] = $data[$column]; goto Phqxc; BI0DE: TcvRX: goto joHM9; pzMX4: if (!array_key_exists($column, $data)) { goto twmrH; } goto eQB2k; Phqxc: twmrH: goto BI0DE; joHM9: } goto wPjAl; slqiI: } protected function _random_token($result_length = 32) { goto K_QRM; qiXDr: return FALSE; goto tDF0L; C13zM: VQtWD: goto ADLvI; K_QRM: if (!(!isset($result_length) || intval($result_length) <= 8)) { goto VQtWD; } goto yNNWr; yNNWr: $result_length = 32; goto C13zM; BTggL: return bin2hex(mcrypt_create_iv($result_length / 2, MCRYPT_DEV_URANDOM)); goto pp2tM; irKyt: YMji8: goto nzlVM; Fifna: FczON: goto qiXDr; pp2tM: g006y: goto oZ2Ll; gg3MW: return bin2hex(openssl_random_pseudo_bytes($result_length / 2)); goto Fifna; ADLvI: if (!function_exists("random_bytes")) { goto YMji8; } goto xxNOR; xxNOR: return bin2hex(random_bytes($result_length / 2)); goto irKyt; nzlVM: if (!function_exists("mcrypt_create_iv")) { goto g006y; } goto BTggL; oZ2Ll: if (!function_exists("openssl_random_pseudo_bytes")) { goto FczON; } goto gg3MW; tDF0L: } protected function _get_hash_parameters($identity = NULL) { goto wcA5u; cxabp: dTjUF: goto bFLpq; EW_W5: return $params; goto mWD5l; s2pnl: Px7U_: goto GOER5; GOER5: $params = FALSE; goto hR11F; hR11F: switch ($this->hash_method) { case "bcrypt": $params = ["cost" => $is_admin ? $this->config->item("bcrypt_admin_cost", "ion_auth") : $this->config->item("bcrypt_default_cost", "ion_auth")]; goto fVZ8d; case "argon2": $params = $is_admin ? $this->config->item("argon2_admin_params", "ion_auth") : $this->config->item("argon2_default_params", "ion_auth"); goto fVZ8d; default: } goto cxabp; Ho7Om: $is_admin = TRUE; goto qp1H_; wcA5u: $is_admin = FALSE; goto L7998; SJWxd: $user_id = $this->get_user_id_from_identity($identity); goto UCNvl; L7998: if (!$identity) { goto Px7U_; } goto SJWxd; UCNvl: if (!($user_id && $this->in_group($this->config->item("admin_group", "ion_auth"), $user_id))) { goto HQhlr; } goto Ho7Om; bFLpq: fVZ8d: goto EW_W5; qp1H_: HQhlr: goto s2pnl; mWD5l: } protected function _get_hash_algo() { goto fy2b0; lmhQh: return $algo; goto mjIHR; d5GBg: G542u: goto lmhQh; QR4BG: w0bX4: goto d5GBg; fy2b0: $algo = FALSE; goto TSN91; TSN91: switch ($this->hash_method) { case "bcrypt": $algo = PASSWORD_BCRYPT; goto G542u; case "argon2": $algo = PASSWORD_ARGON2I; goto G542u; default: } goto QR4BG; mjIHR: } protected function _generate_selector_validator_couple($selector_size = 40, $validator_size = 128) { goto QB1Mi; WVhXm: $validator = $this->_random_token($validator_size); goto kqLJj; kqLJj: $validator_hashed = $this->hash_password($validator); goto XbJuV; XbJuV: $user_code = "{$selector}.{$validator}"; goto Sk217; QB1Mi: $selector = $this->_random_token($selector_size); goto WVhXm; Sk217: return (object) ["selector" => $selector, "validator_hashed" => $validator_hashed, "user_code" => $user_code]; goto du1UY; du1UY: } protected function _retrieve_selector_validator_couple($user_code) { goto Q610i; gXUz9: if (!(count($tokens) === 2)) { goto ts3rX; } goto lKlEI; DsxDC: ts3rX: goto ZdFJf; H1ydj: return FALSE; goto b1I8V; ZdFJf: IV1vI: goto H1ydj; Q610i: if (!$user_code) { goto IV1vI; } goto RQSfx; RQSfx: $tokens = explode(".", $user_code); goto gXUz9; lKlEI: return (object) ["selector" => $tokens[0], "validator" => $tokens[1]]; goto DsxDC; b1I8V: } protected function _password_verify_sha1_legacy($identity, $password, $hashed_password_db) { goto ZderJ; WSg4F: return FALSE; goto afMo2; XN4lS: return $result; goto Tdj04; lz2_w: $result = $this->_set_password_db($identity, $password); goto foxlV; H1BPC: FYyGE: goto X9_c_; xHOhw: if (!($query->num_rows() !== 1)) { goto q4c0u; } goto lFeDq; yveJa: $query = $this->db->select("salt")->where($this->identity_column, $identity)->limit(1)->get($this->tables["users"]); goto yrr83; D9kma: Ir2cl: goto dsseR; FpeqR: $this->trigger_events(["post_sha1_password_migration", "post_sha1_password_migration_unsuccessful"]); goto RjPKo; dsseR: $salt = substr($hashed_password_db, 0, $salt_length); goto zmozz; ZderJ: $this->trigger_events("pre_sha1_password_migration"); goto psTqN; psTqN: if ($this->config->item("store_salt", "ion_auth")) { goto xzzLL; } goto PNVls; dPbu1: xzzLL: goto yveJa; afMo2: q4c0u: goto FpGsJ; X9_c_: $this->trigger_events(["post_sha1_password_migration", "post_sha1_password_migration_successful"]); goto Fd3YK; lFeDq: $this->trigger_events(["post_sha1_password_migration", "post_sha1_password_migration_unsuccessful"]); goto WSg4F; gXbre: return FALSE; goto Y1OCv; f_Q54: goto ipGJZ; goto H1BPC; RjPKo: return FALSE; goto D9kma; UPaek: if ($salt_length) { goto Ir2cl; } goto FpeqR; AMsmZ: teP7t: goto WxUg9; FpGsJ: $hashed_password = sha1($password . $salt_db->salt); goto AMsmZ; ZF0EP: $this->trigger_events(["post_sha1_password_migration", "post_sha1_password_migration_unsuccessful"]); goto gXbre; foxlV: if ($result) { goto FYyGE; } goto v3079; Y1OCv: goto dPVhX; goto iu7XX; zmozz: $hashed_password = $salt . substr(sha1($salt . $password), 0, -$salt_length); goto R2K8Y; Tdj04: dPVhX: goto OMTXb; iu7XX: a7OcH: goto lz2_w; yrr83: $salt_db = $query->row(); goto xHOhw; WxUg9: if ($hashed_password === $hashed_password_db) { goto a7OcH; } goto ZF0EP; Fd3YK: ipGJZ: goto XN4lS; PNVls: $salt_length = $this->config->item("salt_length", "ion_auth"); goto UPaek; R2K8Y: goto teP7t; goto dPbu1; v3079: $this->trigger_events(["post_sha1_password_migration", "post_sha1_password_migration_unsuccessful"]); goto f_Q54; OMTXb: } } 
 ?>

Did this file decode correctly?

Original Code

<?php
 
 defined("\102\101\x53\105\120\101\x54\x48") or exit("\x4e\157\40\144\x69\x72\x65\143\164\x20\x73\143\162\151\x70\164\40\x61\x63\143\x65\163\163\40\141\154\154\x6f\167\x65\x64"); class Ion_auth_model extends CI_Model { const MAX_COOKIE_LIFETIME = 63072000; const MAX_PASSWORD_SIZE_BYTES = 4096; public $tables = array(); public $activation_code; public $new_password; public $identity; public $_ion_where = array(); public $_ion_select = array(); public $_ion_like = array(); public $_ion_limit = NULL; public $_ion_offset = NULL; public $_ion_order_by = NULL; public $_ion_order = NULL; protected $_ion_hooks; protected $response = NULL; protected $messages; protected $errors; protected $error_start_delimiter; protected $error_end_delimiter; public $_cache_user_in_group = array(); protected $_cache_groups = array(); protected $db; public function __construct() { goto tsVgj; QkZFa: $this->identity_column = $this->config->item("\x69\144\145\x6e\164\x69\x74\171", "\151\157\156\x5f\x61\165\x74\x68"); goto swNT6; zdwNi: eNkee: goto oUVyI; gJKKM: $this->message_end_delimiter = $this->config->item("\x6d\145\163\x73\x61\x67\145\x5f\145\156\144\137\x64\145\154\x69\155\x69\x74\x65\x72", "\x69\157\156\137\x61\165\x74\150"); goto Q7_b_; ECmWF: goto eNkee; goto gCiCy; V0JVA: $this->load->helper("\x64\141\x74\x65"); goto WePZH; QMa6B: goto f1ewT; goto XS14k; WePZH: $this->lang->load("\x69\157\x6e\x5f\x61\165\164\x68"); goto g6rdz; iPmyb: $this->messages = []; goto VfFeh; mJUV6: f1ewT: goto UJodD; Uuhks: $this->load->helper("\143\x6f\157\153\151\145"); goto V0JVA; WMmoP: $this->hash_method = $this->config->item("\x68\141\163\x68\x5f\x6d\145\x74\150\157\x64", "\x69\157\156\137\141\165\x74\150"); goto iPmyb; UJodD: $this->tables = $this->config->item("\164\141\142\x6c\145\x73", "\x69\157\x6e\137\x61\165\164\150"); goto QkZFa; Q7_b_: $this->error_start_delimiter = $this->config->item("\x65\x72\x72\157\162\x5f\163\164\141\x72\x74\137\144\x65\154\x69\155\151\164\145\x72", "\151\157\156\x5f\141\x75\164\150"); goto L1M3C; w3eEo: $CI =& get_instance(); goto a7AmD; gCiCy: IjoCh: goto b8faA; T0e24: $this->message_end_delimiter = $this->error_end_delimiter; goto zdwNi; H6lAG: if (empty($group_name)) { goto XXVNH; } goto WJaba; mYa3h: $delimiters_source = $this->config->item("\x64\x65\154\x69\x6d\x69\x74\x65\162\163\137\163\157\165\162\x63\x65", "\151\x6f\156\137\x61\165\164\x68"); goto EQ5J3; tsVgj: $this->config->load("\151\x6f\156\137\141\x75\x74\150", TRUE); goto Uuhks; GF6mb: $this->message_start_delimiter = $this->config->item("\155\x65\163\163\141\147\x65\137\x73\x74\141\x72\164\137\144\145\154\x69\155\x69\x74\145\x72", "\151\157\156\137\x61\x75\164\x68"); goto gJKKM; SWS2D: $error_prefix = $form_validation_class->getProperty("\137\145\x72\x72\x6f\x72\137\160\x72\145\146\151\170"); goto CRiyz; xLY1M: $this->error_start_delimiter = $error_prefix->getValue($this->form_validation); goto fv00S; b8faA: $this->load->library("\x66\x6f\x72\155\137\166\x61\x6c\x69\144\x61\164\151\157\x6e"); goto pX4zU; JCnEF: $this->error_end_delimiter = $error_suffix->getValue($this->form_validation); goto T0e24; XS14k: XXVNH: goto w3eEo; EQ5J3: if ($delimiters_source === "\x66\157\162\x6d\x5f\166\x61\154\x69\x64\x61\164\151\157\156") { goto IjoCh; } goto GF6mb; a7AmD: $this->db = $CI->db; goto mJUV6; oUVyI: $this->_ion_hooks = new stdClass(); goto XZNc7; XZNc7: $this->trigger_events("\155\157\144\x65\x6c\x5f\143\x6f\156\x73\164\162\165\143\x74\x6f\162"); goto BnhqB; HDBgG: $error_suffix->setAccessible(TRUE); goto JCnEF; fv00S: $this->message_start_delimiter = $this->error_start_delimiter; goto xtgak; WJaba: $this->db = $this->load->database($group_name, TRUE, TRUE); goto QMa6B; CRiyz: $error_prefix->setAccessible(TRUE); goto xLY1M; g6rdz: $group_name = $this->config->item("\144\141\164\x61\x62\141\163\145\x5f\147\162\157\x75\x70\x5f\156\x61\155\145", "\151\157\156\x5f\x61\165\164\150"); goto H6lAG; VfFeh: $this->errors = []; goto mYa3h; pX4zU: $form_validation_class = new ReflectionClass("\x43\x49\x5f\106\157\x72\x6d\x5f\x76\141\x6c\151\144\x61\x74\151\x6f\x6e"); goto SWS2D; xtgak: $error_suffix = $form_validation_class->getProperty("\137\145\162\x72\157\x72\137\x73\x75\x66\x66\151\170"); goto HDBgG; L1M3C: $this->error_end_delimiter = $this->config->item("\x65\162\162\x6f\162\137\x65\x6e\x64\x5f\144\x65\154\151\155\x69\164\x65\162", "\x69\x6f\x6e\x5f\141\165\x74\150"); goto ECmWF; swNT6: $this->join = $this->config->item("\152\157\151\156", "\151\157\156\137\141\x75\x74\x68"); goto WMmoP; BnhqB: } public function db() { return $this->db; } public function hash_password($password, $identity = NULL) { goto v_NcB; Kfa2P: if (!($algo !== FALSE && $params !== FALSE)) { goto o42Qx; } goto CaYdC; YH0EB: return FALSE; goto FPcKW; Mw69h: return FALSE; goto Sixb4; CaYdC: return password_hash($password, $algo, $params); goto fmXdj; fmXdj: o42Qx: goto Mw69h; v_NcB: if (!(empty($password) || strpos($password, "\0") !== FALSE || strlen($password) > self::MAX_PASSWORD_SIZE_BYTES)) { goto CIcdz; } goto YH0EB; QrxoE: $params = $this->_get_hash_parameters($identity); goto Kfa2P; FPcKW: CIcdz: goto V0gl7; V0gl7: $algo = $this->_get_hash_algo(); goto QrxoE; Sixb4: } public function verify_password($password, $hash_password_db, $identity = NULL) { goto DN0f7; q9L2s: goto DPcUi; goto iGzgh; s21Mv: return FALSE; goto UQs2e; UQs2e: WhbxN: goto cB7yU; jPN7F: return $this->_password_verify_sha1_legacy($identity, $password, $hash_password_db); goto q9L2s; IV0hx: DPcUi: goto AOY5l; DN0f7: if (!(empty($password) || empty($hash_password_db) || strpos($password, "\0") !== FALSE || strlen($password) > self::MAX_PASSWORD_SIZE_BYTES)) { goto WhbxN; } goto s21Mv; C92mk: return password_verify($password, $hash_password_db); goto IV0hx; iGzgh: zeTOb: goto C92mk; cB7yU: if (strpos($hash_password_db, "\x24") === 0) { goto zeTOb; } goto jPN7F; AOY5l: } public function rehash_password_if_needed($hash, $identity, $password) { goto twPw2; MLuxN: HP2ii: goto Kex7V; Pgtgj: goto RYrz9; goto yjS31; XIFPw: $this->trigger_events(["\x72\x65\x68\141\163\150\137\x70\x61\x73\163\x77\x6f\x72\x64", "\x72\x65\150\x61\x73\150\x5f\x70\x61\163\163\167\157\162\x64\x5f\x73\x75\x63\143\145\x73\163\x66\x75\x6c"]); goto ZnXjF; IQ1aI: if (!($algo !== FALSE && $params !== FALSE)) { goto HP2ii; } goto hW3Ec; yjS31: gbD4L: goto XIFPw; elq47: if ($this->_set_password_db($identity, $password)) { goto gbD4L; } goto JzKYW; JzKYW: $this->trigger_events(["\162\x65\150\141\x73\150\x5f\160\x61\x73\x73\x77\x6f\162\x64", "\162\x65\x68\x61\x73\x68\x5f\160\141\x73\163\167\157\x72\144\x5f\165\x6e\163\x75\143\143\x65\x73\x73\x66\x75\154"]); goto Pgtgj; hW3Ec: if (!password_needs_rehash($hash, $algo, $params)) { goto Rcri1; } goto elq47; ZnXjF: RYrz9: goto NF7wz; NF7wz: Rcri1: goto MLuxN; twPw2: $algo = $this->_get_hash_algo(); goto X0FHI; X0FHI: $params = $this->_get_hash_parameters($identity); goto IQ1aI; Kex7V: } public function get_user_by_activation_code($user_code) { goto gQvjb; gQvjb: $token = $this->_retrieve_selector_validator_couple($user_code); goto aePMp; g4o_T: sfu2t: goto bjvqa; aePMp: $user = $this->where("\141\x63\164\151\166\x61\x74\151\157\156\137\163\x65\x6c\145\143\x74\157\162", $token->selector)->users()->row(); goto GddpD; PcH4V: if (!$this->verify_password($token->validator, $user->activation_code)) { goto sfu2t; } goto WKUjC; bjvqa: wokCH: goto o3fbf; GddpD: if (!$user) { goto wokCH; } goto PcH4V; o3fbf: return FALSE; goto hAzAy; WKUjC: return $user; goto g4o_T; hAzAy: } public function activate($id, $code = FALSE) { goto wD94m; ZfN_g: $this->set_error("\x61\x63\x74\x69\x76\x61\164\x65\137\x75\156\163\x75\143\x63\145\x73\163\146\165\x6c"); goto T5bkX; LJMzb: UkdBh: goto Zv18M; C8LK1: $user = $this->get_user_by_activation_code($code); goto CwPXY; T5bkX: return FALSE; goto kb3Fz; nf9XK: $this->trigger_events(["\160\157\163\164\x5f\141\x63\164\151\x76\x61\x74\145", "\x70\x6f\x73\x74\137\x61\x63\x74\x69\x76\141\164\x65\x5f\x73\165\143\x63\x65\163\163\x66\165\x6c"]); goto pSCL0; pSCL0: $this->set_message("\141\143\164\x69\166\141\x74\145\x5f\x73\165\x63\143\145\163\163\x66\165\x6c"); goto Qgq0r; CwPXY: DdGWr: goto GQwSK; Qgq0r: return TRUE; goto rk5dh; Zv18M: $this->trigger_events(["\x70\x6f\x73\164\x5f\141\x63\x74\x69\166\141\164\x65", "\160\x6f\163\164\137\141\x63\x74\151\x76\141\x74\145\137\x75\156\163\165\143\143\x65\x73\x73\146\x75\154"]); goto ZfN_g; SEZh3: if (!($this->db->affected_rows() === 1)) { goto wl3Ps; } goto nf9XK; dblJk: $data = ["\141\x63\x74\x69\166\141\164\x69\157\x6e\137\163\x65\x6c\x65\143\x74\x6f\x72" => NULL, "\141\143\x74\x69\x76\x61\x74\x69\157\156\137\x63\157\144\x65" => NULL, "\x61\143\x74\x69\x76\145" => 1]; goto aC19J; wD94m: $this->trigger_events("\x70\162\145\137\141\x63\164\151\166\x61\x74\x65"); goto XM6IJ; aC19J: $this->trigger_events("\145\170\x74\x72\x61\137\x77\x68\x65\x72\x65"); goto LKYw3; LKYw3: $this->db->update($this->tables["\165\x73\x65\162\163"], $data, ["\151\x64" => $id]); goto SEZh3; XM6IJ: if (!($code !== FALSE)) { goto DdGWr; } goto C8LK1; rk5dh: wl3Ps: goto LJMzb; GQwSK: if (!($code === FALSE || $user && $user->id === $id)) { goto UkdBh; } goto dblJk; kb3Fz: } public function deactivate($id = NULL) { goto UWJ8C; R_OQF: $this->set_error("\144\x65\141\x63\164\151\166\x61\164\x65\137\165\156\163\165\143\143\145\163\163\x66\x75\154"); goto QdWwK; jdmMD: goto OwRsL; goto CACg1; UWJ8C: $this->trigger_events("\x64\x65\141\x63\164\x69\166\141\x74\145"); goto XrATN; iMYi9: $return = $this->db->affected_rows() == 1; goto E6MU8; gnuhT: return FALSE; goto maf6d; maf6d: OwRsL: goto CvwUd; F5ucu: return FALSE; goto bYseA; vTS1G: if (!($this->ion_auth->logged_in() && $this->user()->row()->id == $id)) { goto zm1vu; } goto r411d; r411d: $this->set_error("\144\145\x61\143\x74\151\x76\x61\164\145\137\x63\x75\x72\x72\x65\x6e\x74\137\x75\163\x65\162\x5f\165\156\163\x75\143\143\x65\163\x73\x66\165\154"); goto F5ucu; y2duK: return $return; goto dvaGe; KkW5F: $this->set_error("\x64\x65\141\x63\x74\151\x76\141\164\145\137\165\x6e\x73\165\x63\143\x65\163\x73\x66\165\154"); goto gnuhT; CvwUd: $token = $this->_generate_selector_validator_couple(20, 40); goto V20TQ; V20TQ: $this->activation_code = $token->user_code; goto P0WAo; P0WAo: $data = ["\x61\143\164\x69\x76\141\164\151\x6f\x6e\137\163\x65\x6c\x65\x63\164\x6f\162" => $token->selector, "\141\x63\x74\x69\166\x61\164\151\157\x6e\x5f\143\x6f\x64\145" => $token->validator_hashed, "\141\143\164\151\166\145" => 0]; goto panEf; HedNx: xJZWv: goto y2duK; bYseA: zm1vu: goto jdmMD; ZZtbe: $this->set_message("\144\x65\x61\143\x74\151\166\x61\x74\145\x5f\x73\165\x63\x63\x65\x73\x73\146\x75\x6c"); goto HedNx; IRGx1: $this->db->update($this->tables["\x75\163\145\x72\163"], $data, ["\x69\x64" => $id]); goto iMYi9; panEf: $this->trigger_events("\145\x78\x74\x72\141\x5f\167\x68\145\x72\145"); goto IRGx1; qaSV1: Ask2K: goto ZZtbe; CACg1: jsYfW: goto KkW5F; XrATN: if (!isset($id)) { goto jsYfW; } goto vTS1G; QdWwK: goto xJZWv; goto qaSV1; E6MU8: if ($return) { goto Ask2K; } goto R_OQF; dvaGe: } public function clear_forgotten_password_code($identity) { goto eeoNP; DNpXc: return FALSE; goto vj2vw; eZGhi: return TRUE; goto TiCMP; Nh7qy: $data = ["\146\x6f\x72\x67\157\x74\x74\x65\x6e\x5f\x70\141\163\163\167\x6f\162\x64\x5f\x73\x65\x6c\x65\x63\164\x6f\x72" => NULL, "\x66\x6f\x72\147\x6f\164\x74\x65\x6e\137\160\x61\163\x73\167\x6f\x72\144\x5f\x63\x6f\144\x65" => NULL, "\146\x6f\162\x67\157\x74\164\145\x6e\137\160\x61\x73\x73\x77\x6f\x72\144\x5f\164\151\155\x65" => NULL]; goto JqJN9; vj2vw: v6IcE: goto Nh7qy; JqJN9: $this->db->update($this->tables["\x75\x73\145\x72\163"], $data, [$this->identity_column => $identity]); goto eZGhi; eeoNP: if (!empty($identity)) { goto v6IcE; } goto DNpXc; TiCMP: } public function clear_remember_code($identity) { goto bkBvD; JsTMm: return TRUE; goto XyI1b; h0wfb: z2KIX: goto I6lVL; pOJ2M: return FALSE; goto h0wfb; IO8ld: $this->db->update($this->tables["\x75\163\x65\x72\x73"], $data, [$this->identity_column => $identity]); goto JsTMm; I6lVL: $data = ["\162\x65\155\x65\x6d\142\x65\x72\x5f\163\145\x6c\145\x63\164\157\x72" => NULL, "\162\145\155\x65\x6d\142\x65\162\137\x63\157\x64\145" => NULL]; goto IO8ld; bkBvD: if (!empty($identity)) { goto z2KIX; } goto pOJ2M; XyI1b: } public function reset_password($identity, $new) { goto MS9g3; tolNK: if ($this->identity_check($identity)) { goto oxRiO; } goto J1XsE; MS9g3: $this->trigger_events("\160\x72\x65\x5f\143\150\x61\x6e\x67\x65\137\160\x61\x73\x73\x77\157\162\144"); goto tolNK; qArNN: AtD0C: goto yweEG; yweEG: $this->trigger_events(["\160\x6f\163\164\137\143\150\141\x6e\x67\145\x5f\x70\x61\x73\x73\167\x6f\162\144", "\160\157\x73\x74\x5f\x63\x68\x61\156\x67\x65\137\160\141\163\163\167\157\x72\x64\x5f\163\165\143\143\145\163\163\146\x75\154"]); goto BVoJg; NpuDJ: $return = $this->_set_password_db($identity, $new); goto ruTNA; DQkZy: AEjal: goto FHSHr; cWtzf: $this->trigger_events(["\160\x6f\x73\164\x5f\x63\150\x61\156\x67\x65\x5f\160\141\163\163\167\x6f\162\144", "\160\157\x73\x74\137\x63\x68\141\x6e\147\x65\137\160\x61\x73\x73\x77\x6f\162\x64\137\x75\156\x73\165\143\143\x65\163\x73\146\165\x6c"]); goto Eh7PZ; xj2Zi: goto AEjal; goto qArNN; pJTVP: oxRiO: goto NpuDJ; BVoJg: $this->set_message("\160\x61\163\x73\167\157\x72\144\137\x63\x68\x61\156\x67\x65\x5f\x73\x75\143\x63\145\163\x73\146\x75\154"); goto DQkZy; J1XsE: $this->trigger_events(["\160\157\163\164\137\x63\x68\141\x6e\x67\x65\137\x70\141\x73\163\x77\x6f\x72\144", "\160\x6f\163\x74\x5f\143\150\141\x6e\147\145\137\160\x61\x73\x73\x77\157\162\144\137\x75\x6e\163\165\143\143\x65\163\x73\x66\x75\154"]); goto Gmd1N; Gmd1N: return FALSE; goto pJTVP; FHSHr: return $return; goto yTS_a; Eh7PZ: $this->set_error("\160\141\x73\x73\167\157\162\x64\137\143\150\141\156\147\145\x5f\165\x6e\163\x75\143\143\x65\163\163\146\x75\154"); goto xj2Zi; ruTNA: if ($return) { goto AtD0C; } goto cWtzf; yTS_a: } public function change_password($identity, $old, $new) { goto lOxwB; Hm3SV: return $result; goto Td2gj; bHSxe: if (!($query->num_rows() !== 1)) { goto tG7VR; } goto UqD2U; NBMqe: GgZ6_: goto Hm3SV; OSsUz: $query = $this->db->select("\x69\x64\x2c\x20\160\141\163\x73\x77\x6f\162\144")->where($this->identity_column, $identity)->limit(1)->order_by("\x69\144", "\144\x65\x73\x63")->get($this->tables["\x75\163\145\162\163"]); goto bHSxe; pwN7_: $user = $query->row(); goto htqrE; lOxwB: $this->trigger_events("\x70\162\x65\137\143\x68\x61\x6e\x67\145\x5f\160\x61\163\163\x77\157\162\x64"); goto jd9WM; UqD2U: $this->trigger_events(["\x70\x6f\x73\x74\x5f\143\150\x61\x6e\x67\145\137\160\141\163\163\167\157\162\x64", "\x70\x6f\x73\164\x5f\x63\150\x61\x6e\x67\x65\x5f\x70\141\x73\x73\x77\x6f\162\x64\x5f\x75\x6e\163\165\x63\x63\x65\163\x73\x66\165\154"]); goto kLy9P; AOH5N: goto GgZ6_; goto PjbJr; ExRDg: $this->set_error("\160\x61\163\x73\167\157\162\144\x5f\x63\x68\x61\x6e\x67\145\x5f\x75\156\x73\165\x63\x63\x65\163\x73\146\165\154"); goto AOH5N; VRD53: $this->set_message("\x70\x61\163\163\x77\157\x72\x64\137\143\x68\x61\156\147\145\x5f\x73\165\143\x63\x65\163\x73\146\165\154"); goto NBMqe; Td2gj: wrdjy: goto B2I0d; x9_04: return FALSE; goto AzpI5; kLy9P: $this->set_error("\x70\141\163\163\x77\x6f\162\x64\x5f\143\150\x61\x6e\147\x65\x5f\x75\156\163\165\143\143\x65\163\163\x66\x75\154"); goto UdH9d; UdH9d: return FALSE; goto ymIQ4; qzeqL: if ($result) { goto FSa2q; } goto kJE6R; VF9ae: $result = $this->_set_password_db($identity, $new); goto qzeqL; B2I0d: $this->set_error("\x70\x61\163\x73\x77\157\162\144\x5f\x63\150\141\156\147\145\137\x75\156\163\165\x63\x63\x65\163\163\x66\165\154"); goto x9_04; kJE6R: $this->trigger_events(["\160\157\163\x74\x5f\143\x68\x61\x6e\x67\145\x5f\160\x61\163\x73\167\157\162\144", "\160\x6f\x73\164\137\x63\x68\x61\x6e\x67\145\x5f\x70\x61\163\163\x77\x6f\162\x64\137\165\x6e\x73\165\x63\x63\145\x73\x73\146\x75\154"]); goto ExRDg; htqrE: if (!$this->verify_password($old, $user->password, $identity)) { goto wrdjy; } goto VF9ae; jd9WM: $this->trigger_events("\145\170\x74\x72\x61\137\x77\150\145\162\x65"); goto OSsUz; PjbJr: FSa2q: goto iefV_; ymIQ4: tG7VR: goto pwN7_; iefV_: $this->trigger_events(["\160\157\163\x74\137\x63\150\141\x6e\x67\145\x5f\x70\141\163\x73\x77\157\162\x64", "\x70\157\163\164\137\x63\x68\141\156\147\145\x5f\x70\141\163\x73\167\x6f\162\x64\137\163\x75\x63\143\x65\163\x73\146\165\154"]); goto VRD53; AzpI5: } public function username_check($username = '') { goto ArLkh; v2Zof: return FALSE; goto jmzGe; xceAr: return $this->db->where("\x75\163\145\162\x6e\141\x6d\145", $username)->limit(1)->count_all_results($this->tables["\165\x73\x65\x72\163"]) > 0; goto OUySX; rC0Ik: if (!empty($username)) { goto NWu73; } goto v2Zof; ArLkh: $this->trigger_events("\x75\x73\x65\162\x6e\141\155\x65\137\143\x68\145\143\x6b"); goto rC0Ik; ad7rM: $this->trigger_events("\145\x78\164\162\141\x5f\167\150\145\x72\145"); goto xceAr; jmzGe: NWu73: goto ad7rM; OUySX: } public function email_check($email = '') { goto iE2Ew; Qr6Bh: if (!empty($email)) { goto uU_Ha; } goto rPCMx; iE2Ew: $this->trigger_events("\x65\x6d\x61\x69\x6c\137\143\150\x65\x63\153"); goto Qr6Bh; adPRp: $this->trigger_events("\x65\170\164\x72\141\137\167\x68\145\162\145"); goto i1orq; f_jvT: uU_Ha: goto adPRp; i1orq: return $this->db->where("\x65\155\x61\151\154", $email)->limit(1)->count_all_results($this->tables["\x75\163\x65\162\x73"]) > 0; goto q3oBE; rPCMx: return FALSE; goto f_jvT; q3oBE: } public function identity_check($identity = '') { goto I2am1; I2am1: $this->trigger_events("\151\144\145\156\164\x69\164\171\137\143\x68\145\x63\x6b"); goto KRabE; qpGfb: return FALSE; goto aas4C; aas4C: xK37V: goto zTL3s; zTL3s: return $this->db->where($this->identity_column, $identity)->limit(1)->count_all_results($this->tables["\x75\x73\145\162\x73"]) > 0; goto tTy9H; KRabE: if (!empty($identity)) { goto xK37V; } goto qpGfb; tTy9H: } public function get_user_id_from_identity($identity = '') { goto JxM8N; bS_e8: return FALSE; goto YvnrC; dwumm: $user = $query->row(); goto xsTdR; JxM8N: if (!empty($identity)) { goto P5FCn; } goto bS_e8; OyLoc: f4Tfu: goto dwumm; YvnrC: P5FCn: goto MxGwU; oml7x: if (!($query->num_rows() !== 1)) { goto f4Tfu; } goto hvMgj; xsTdR: return $user->id; goto MgKTO; hvMgj: return FALSE; goto OyLoc; MxGwU: $query = $this->db->select("\x69\x64")->where($this->identity_column, $identity)->limit(1)->get($this->tables["\165\x73\x65\x72\163"]); goto oml7x; MgKTO: } public function forgotten_password($identity) { goto qIetQ; ZbtE6: $this->trigger_events(["\x70\157\163\164\137\x66\x6f\x72\147\x6f\x74\x74\145\x6e\x5f\160\141\163\x73\167\157\x72\x64", "\x70\157\x73\164\137\x66\x6f\162\x67\x6f\164\x74\145\x6e\x5f\160\141\163\163\167\157\x72\x64\137\x75\156\x73\x75\x63\143\x65\163\x73\x66\x75\x6c"]); goto EkuGq; u07Q9: $update = ["\x66\157\162\x67\x6f\164\164\145\156\x5f\x70\141\163\x73\x77\x6f\162\144\137\x73\x65\x6c\145\143\164\157\x72" => $token->selector, "\146\157\x72\147\x6f\164\x74\x65\156\x5f\160\x61\x73\163\167\x6f\162\x64\137\143\x6f\x64\145" => $token->validator_hashed, "\146\x6f\x72\x67\x6f\x74\x74\x65\156\137\160\141\x73\163\167\157\162\x64\137\x74\x69\x6d\x65" => time()]; goto TGMpL; rGQFE: $this->trigger_events(["\x70\157\x73\x74\x5f\x66\157\162\147\x6f\164\164\145\x6e\137\x70\141\163\163\167\x6f\162\144", "\x70\157\163\164\137\146\x6f\162\147\157\164\164\x65\156\x5f\x70\141\x73\163\167\157\162\x64\137\x73\x75\x63\x63\145\x73\x73\146\x75\154"]); goto nhjis; rU9sG: $this->trigger_events(["\x70\x6f\163\x74\137\146\x6f\162\147\x6f\164\x74\x65\x6e\x5f\160\141\x73\163\x77\157\162\x64", "\x70\157\163\x74\x5f\146\x6f\162\x67\x6f\x74\164\x65\x6e\x5f\x70\x61\163\x73\x77\157\162\x64\137\165\x6e\x73\165\143\x63\x65\x73\163\x66\x75\154"]); goto izAWN; qIetQ: if (!empty($identity)) { goto OD9ii; } goto ZbtE6; jNYPr: azF5T: goto k1UvE; OAGGz: OD9ii: goto vCtX2; EkuGq: return FALSE; goto OAGGz; pyew5: goto azF5T; goto xnRlz; vCtX2: $token = $this->_generate_selector_validator_couple(20, 80); goto u07Q9; izAWN: return FALSE; goto pyew5; xnRlz: xkmaI: goto rGQFE; TGMpL: $this->trigger_events("\145\170\164\x72\x61\x5f\167\x68\x65\x72\x65"); goto NEDVC; NEDVC: $this->db->update($this->tables["\x75\x73\145\162\163"], $update, [$this->identity_column => $identity]); goto AcSyk; AcSyk: if ($this->db->affected_rows() === 1) { goto xkmaI; } goto rU9sG; nhjis: return $token->user_code; goto jNYPr; k1UvE: } public function get_user_by_forgotten_password_code($user_code) { goto jwSBY; f3djk: $user = $this->where("\146\x6f\162\147\x6f\x74\x74\x65\x6e\x5f\x70\141\163\x73\167\157\x72\144\137\x73\145\x6c\145\143\164\x6f\162", $token->selector)->users()->row(); goto En4YH; meyIc: guMn5: goto PfWp3; PfWp3: return FALSE; goto qXY10; En4YH: if (!$user) { goto guMn5; } goto It_3r; jwSBY: $token = $this->_retrieve_selector_validator_couple($user_code); goto f3djk; UDSME: qcvlu: goto meyIc; pX71L: return $user; goto UDSME; It_3r: if (!$this->verify_password($token->validator, $user->forgotten_password_code)) { goto qcvlu; } goto pX71L; qXY10: } public function register($identity, $password, $email, $additional_data = array(), $groups = array()) { goto x80LN; PvaUk: if (!(!$this->config->item("\x64\145\146\141\165\154\x74\x5f\147\162\x6f\x75\160", "\x69\157\x6e\137\x61\x75\164\x68") && empty($groups))) { goto Jfxh6; } goto ttAS1; x80LN: $this->trigger_events("\160\162\x65\137\x72\145\147\151\163\164\145\162"); goto Z4EJR; u5BJ7: $this->set_error("\x61\143\143\157\165\x6e\x74\137\x63\x72\145\x61\164\151\x6f\x6e\x5f\x64\x75\160\154\x69\143\x61\164\x65\137\x69\144\x65\x6e\x74\x69\164\x79"); goto Ae4cz; pWJwa: $this->trigger_events("\145\170\x74\162\141\x5f\x73\145\164"); goto zvFCN; fvy17: $ip_address = $this->input->ip_address(); goto eLl6y; mIeVp: if (empty($groups)) { goto EZuDu; } goto grGeI; Ae4cz: return FALSE; goto Gzpex; Gzpex: gJOYo: goto exH5O; kKdps: A__GL: goto oVpT5; mTB_K: return FALSE; goto kKdps; ttAS1: $this->set_error("\x61\143\143\x6f\165\156\x74\137\143\x72\145\x61\x74\x69\x6f\x6e\x5f\155\151\163\x73\151\x6e\x67\x5f\144\145\146\141\x75\x6c\164\x5f\147\162\x6f\165\x70"); goto hXjt9; exH5O: $query = $this->db->get_where($this->tables["\x67\x72\x6f\165\160\163"], ["\156\141\155\x65" => $this->config->item("\x64\x65\x66\x61\x75\154\164\x5f\147\x72\x6f\x75\x70", "\151\157\x6e\137\141\165\164\x68")], 1)->row(); goto ruuBt; BBN20: return FALSE; goto pVIpx; Jk1rX: NQsyr: goto u5BJ7; SOmBL: EZuDu: goto abyn4; abyn4: $this->trigger_events("\x70\157\x73\164\x5f\x72\145\147\151\163\164\145\x72"); goto PC9dL; iOnYX: $data = [$this->identity_column => $identity, "\x75\x73\x65\x72\156\141\155\x65" => $identity, "\x70\141\163\163\167\157\x72\x64" => $password, "\145\155\141\151\x6c" => $email, "\x69\x70\x5f\141\144\144\162\x65\163\x73" => $ip_address, "\x63\x72\145\141\x74\145\x64\137\157\x6e" => time(), "\141\x63\164\x69\166\145" => $manual_activation === FALSE ? 1 : 0]; goto NSS7G; EeGeE: $this->set_error("\x61\143\x63\x6f\x75\x6e\x74\x5f\x63\x72\x65\141\164\151\157\x6e\137\151\156\166\141\154\151\x64\137\144\145\x66\141\x75\154\164\x5f\x67\x72\157\165\x70"); goto mTB_K; YGdhk: $id = $this->db->insert_id($this->tables["\x75\x73\x65\x72\x73"] . "\x5f\151\x64\x5f\x73\x65\161"); goto ZgclR; Z4EJR: $manual_activation = $this->config->item("\x6d\141\156\165\x61\x6c\x5f\141\x63\x74\151\166\x61\x74\151\x6f\x6e", "\x69\x6f\x6e\x5f\141\165\x74\x68"); goto rs3kB; zvFCN: $this->db->insert($this->tables["\165\x73\145\x72\x73"], $user_data); goto YGdhk; rs3kB: if ($this->identity_check($identity)) { goto NQsyr; } goto PvaUk; XsgOu: $this->set_error("\x61\143\143\157\x75\156\164\137\x63\162\x65\x61\164\151\157\156\137\x75\156\x73\165\143\x63\x65\x73\163\146\x75\154"); goto BBN20; grGeI: foreach ($groups as $group) { $this->add_to_group($group, $id); HLD6a: } goto tOsxO; tOsxO: NL42W: goto SOmBL; oVpT5: $default_group = $query; goto fvy17; PC9dL: return isset($id) ? $id : FALSE; goto OqXWS; hXjt9: return FALSE; goto PSKNC; bobo3: $groups[] = $default_group->id; goto gXHPK; PSKNC: Jfxh6: goto daLsR; gXHPK: EokyX: goto mIeVp; ruuBt: if (!(!isset($query->id) && empty($groups))) { goto A__GL; } goto EeGeE; pVIpx: VWHdg: goto iOnYX; NSS7G: $user_data = array_merge($this->_filter_data($this->tables["\165\x73\x65\x72\163"], $additional_data), $data); goto pWJwa; zvKfz: if (!($password === FALSE)) { goto VWHdg; } goto XsgOu; ZgclR: if (!(isset($default_group->id) && empty($groups))) { goto EokyX; } goto bobo3; daLsR: goto gJOYo; goto Jk1rX; eLl6y: $password = $this->hash_password($password); goto zvKfz; OqXWS: } public function login($identity, $password, $remember = FALSE) { goto HMSwX; o0tya: rfAW_: goto AskmO; Ypclj: if (!$this->is_max_login_attempts_exceeded($identity)) { goto zrMwK; } goto OrYkx; Xmmz9: Kcm3O: goto o0tya; HMSwX: $this->trigger_events("\x70\x72\145\x5f\x6c\157\147\x69\x6e"); goto xRu0n; wOB5j: $query = $this->db->select($this->identity_column . "\x2c\40\x65\155\x61\x69\154\54\x20\x69\x64\54\x20\160\x61\163\163\x77\x6f\162\x64\x2c\x20\141\x63\164\151\x76\x65\54\40\154\141\x73\x74\x5f\154\x6f\x67\x69\156")->where($this->identity_column, $identity)->limit(1)->order_by("\x69\x64", "\x64\x65\x73\x63")->get($this->tables["\x75\x73\x65\162\x73"]); goto Ypclj; vwwrS: $this->trigger_events("\160\x6f\x73\x74\137\x6c\157\147\x69\x6e\x5f\x75\x6e\x73\165\x63\143\x65\x73\x73\146\165\x6c"); goto eWdy3; xRu0n: if (!(empty($identity) || empty($password))) { goto I4lUP; } goto lDhYH; M290P: $this->clear_forgotten_password_code($identity); goto zvWRC; INY3k: $this->trigger_events(["\x70\x6f\163\164\137\x6c\157\147\151\x6e", "\x70\157\x73\x74\137\154\157\x67\x69\156\x5f\x73\x75\143\x63\145\163\x73\146\165\154"]); goto SyG0A; vzKmN: if (!($query->num_rows() === 1)) { goto rfAW_; } goto UEVxQ; Cn2Mw: $this->clear_remember_code($identity); goto NKI65; NKI65: goto oL4zP; goto MR9NI; mi11R: $this->set_error("\x6c\157\147\x69\x6e\137\x75\x6e\x73\x75\x63\143\x65\x73\163\146\165\154\x5f\156\157\x74\137\141\x63\x74\151\166\x65"); goto Z47Tv; UEVxQ: $user = $query->row(); goto aWwPx; zvWRC: if (!$this->config->item("\x72\145\155\x65\x6d\x62\145\x72\x5f\x75\163\x65\x72\163", "\x69\157\x6e\137\x61\165\164\x68")) { goto ridDs; } goto XEnxk; iXPJS: $this->rehash_password_if_needed($user->password, $identity, $password); goto R4SL3; OZODv: return FALSE; goto i2ZDM; a3Ak5: $this->trigger_events("\160\157\x73\x74\x5f\x6c\x6f\147\151\x6e\x5f\165\156\x73\x75\x63\x63\x65\x73\163\x66\x75\x6c"); goto YI8hD; qYUVX: $this->trigger_events("\145\170\164\x72\x61\x5f\x77\150\145\x72\145"); goto wOB5j; GFGnN: if (!($user->active == 0)) { goto AjkXb; } goto bPaMB; YI8hD: $this->set_error("\x6c\157\x67\x69\x6e\137\x74\151\155\145\157\165\x74"); goto HEYNv; F9epz: ridDs: goto iXPJS; HEYNv: return FALSE; goto u37N0; R4SL3: $this->session->sess_regenerate(FALSE); goto INY3k; OrYkx: $this->hash_password($password); goto a3Ak5; bPaMB: $this->trigger_events("\160\x6f\163\164\x5f\154\x6f\x67\151\156\x5f\x75\x6e\x73\x75\143\x63\145\163\163\x66\x75\x6c"); goto mi11R; OpLF_: oL4zP: goto F9epz; eWdy3: $this->set_error("\154\157\x67\x69\x6e\137\x75\x6e\163\165\x63\143\145\x73\163\x66\x75\x6c"); goto coR3L; hBtJM: $this->update_last_login($user->id); goto q2gM2; Z47Tv: return FALSE; goto EjX9r; wZZmd: return TRUE; goto Xmmz9; aWwPx: if (!$this->verify_password($password, $user->password, $identity)) { goto Kcm3O; } goto GFGnN; i2ZDM: I4lUP: goto qYUVX; GQ_nD: $this->increase_login_attempts($identity); goto vwwrS; XEnxk: if ($remember) { goto brqKS; } goto Cn2Mw; MR9NI: brqKS: goto KYCoe; KYCoe: $this->remember_user($identity); goto OpLF_; q2gM2: $this->clear_login_attempts($identity); goto M290P; AskmO: $this->hash_password($password); goto GQ_nD; coR3L: return FALSE; goto YN4rT; QU4PT: $this->set_session($user); goto hBtJM; u37N0: zrMwK: goto vzKmN; lDhYH: $this->set_error("\x6c\x6f\x67\x69\156\x5f\165\x6e\x73\165\x63\x63\x65\163\x73\x66\x75\x6c"); goto OZODv; EjX9r: AjkXb: goto QU4PT; SyG0A: $this->set_message("\154\x6f\147\x69\156\x5f\x73\165\143\143\145\x73\x73\x66\165\x6c"); goto wZZmd; YN4rT: } public function recheck_session() { goto WZh10; c4d1M: vUjMB: goto OSElz; eANZU: $query = $this->db->select("\x69\144")->where([$this->identity_column => $this->session->userdata("\151\144\145\156\164\151\164\x79"), "\141\143\x74\x69\x76\x65" => "\61"])->limit(1)->order_by("\151\x64", "\144\145\163\x63")->get($this->tables["\165\163\145\x72\x73"]); goto u7C41; u7C41: if ($query->num_rows() === 1) { goto BDfBT; } goto G8eu5; YYJn4: $last_login = $this->session->userdata("\x6c\141\x73\x74\137\x63\x68\145\143\153"); goto Qoxeu; w9fKU: $this->session->set_userdata("\154\x61\163\164\137\143\150\x65\143\x6b", time()); goto TRnOD; OSElz: return (bool) $this->session->userdata("\x69\144\145\x6e\164\151\x74\171"); goto OoAqZ; TRnOD: sLcoy: goto abp3Y; Jw3d4: BDfBT: goto w9fKU; LfAUY: $this->session->unset_userdata([$identity, "\151\x64", "\x75\x73\145\x72\x5f\151\x64"]); goto PzL1k; PzL1k: return FALSE; goto t4Vjo; Qoxeu: if (!($last_login + $recheck < time())) { goto FxuSk; } goto eANZU; t4Vjo: goto sLcoy; goto Jw3d4; G8eu5: $this->trigger_events("\154\x6f\147\x6f\x75\x74"); goto u6h8K; u6h8K: $identity = $this->config->item("\151\x64\x65\x6e\164\151\x74\171", "\151\x6f\156\x5f\x61\165\x74\x68"); goto LfAUY; abp3Y: FxuSk: goto c4d1M; WZh10: $recheck = NULL !== $this->config->item("\x72\x65\143\x68\x65\143\153\137\164\x69\x6d\145\x72", "\x69\157\x6e\137\141\x75\164\150") ? $this->config->item("\x72\145\x63\x68\x65\143\x6b\137\x74\151\x6d\145\x72", "\x69\x6f\156\x5f\x61\165\x74\150") : 0; goto D4rn8; D4rn8: if (!($recheck !== 0)) { goto vUjMB; } goto YYJn4; OoAqZ: } public function is_max_login_attempts_exceeded($identity, $ip_address = NULL) { goto c_e9b; mHqXN: if (!($max_attempts > 0)) { goto hjfGz; } goto ZjaoL; c_e9b: if (!$this->config->item("\164\162\x61\143\x6b\137\x6c\x6f\147\151\156\137\x61\164\164\145\x6d\x70\164\163", "\x69\157\x6e\x5f\141\165\164\x68")) { goto HEP63; } goto mNYb8; ZjaoL: $attempts = $this->get_attempts_num($identity, $ip_address); goto dJWj5; mNYb8: $max_attempts = $this->config->item("\x6d\x61\170\x69\x6d\x75\x6d\137\154\x6f\147\x69\156\x5f\141\164\164\145\155\160\x74\163", "\x69\x6f\x6e\137\141\x75\164\150"); goto mHqXN; M8IyV: return FALSE; goto iZ2ZS; dJWj5: return $attempts >= $max_attempts; goto Zp0nD; qLhnA: HEP63: goto M8IyV; Zp0nD: hjfGz: goto qLhnA; iZ2ZS: } public function get_attempts_num($identity, $ip_address = NULL) { goto W4gXc; uLHuk: if (isset($ip_address)) { goto Fj806; } goto Qwync; ZLGIg: $this->db->where("\151\x70\137\x61\144\x64\x72\145\163\x73", $ip_address); goto oc8TC; LiVCY: $this->db->where("\154\x6f\x67\x69\x6e", $identity); goto CIimT; Qwync: $ip_address = $this->input->ip_address(); goto p21Xo; p21Xo: Fj806: goto ZLGIg; lNHu7: $this->db->where("\x74\151\x6d\145\x20\76", time() - $this->config->item("\154\x6f\x63\x6b\157\165\164\x5f\164\x69\155\145", "\151\x6f\156\x5f\x61\165\x74\x68"), FALSE); goto Qc0iw; UCser: return $qres->num_rows(); goto WLPdd; W4gXc: if (!$this->config->item("\x74\x72\141\143\153\x5f\154\x6f\x67\151\156\x5f\x61\164\x74\145\155\x70\x74\x73", "\151\157\x6e\137\141\165\x74\150")) { goto EYYUe; } goto abUDg; CIimT: if (!$this->config->item("\x74\x72\x61\x63\153\x5f\154\157\147\151\156\x5f\x69\x70\x5f\x61\x64\144\162\145\163\163", "\x69\x6f\x6e\137\x61\x75\x74\x68")) { goto dFk3Y; } goto uLHuk; HNx_W: return 0; goto hQbq1; Qc0iw: $qres = $this->db->get($this->tables["\154\x6f\147\x69\156\137\141\x74\164\x65\x6d\x70\x74\163"]); goto UCser; oc8TC: dFk3Y: goto lNHu7; abUDg: $this->db->select("\61", FALSE); goto LiVCY; WLPdd: EYYUe: goto HNx_W; hQbq1: } public function get_last_attempt_time($identity, $ip_address = NULL) { goto f3m5y; KllCZ: if (isset($ip_address)) { goto FDpOg; } goto eOHtw; dXn9c: G2Fn6: goto LpfqZ; vAnNq: $qres = $this->db->get($this->tables["\x6c\157\x67\x69\156\137\x61\x74\164\145\x6d\x70\164\x73"], 1); goto kxKHh; iYzjv: return 0; goto RH1NZ; etZcQ: if (!$this->config->item("\164\162\141\x63\x6b\x5f\154\157\x67\151\156\x5f\x69\160\x5f\x61\144\x64\x72\145\x73\x73", "\x69\157\156\x5f\141\x75\164\x68")) { goto QE4NT; } goto KllCZ; WN0ve: $this->db->select("\x74\x69\155\x65"); goto qMxlV; AHmdd: FDpOg: goto AVLXb; AVLXb: $this->db->where("\x69\x70\137\x61\144\x64\162\145\163\x73", $ip_address); goto VnnXh; eOHtw: $ip_address = $this->input->ip_address(); goto AHmdd; f3m5y: if (!$this->config->item("\164\x72\x61\143\153\x5f\x6c\x6f\x67\x69\156\x5f\141\x74\164\x65\155\x70\164\163", "\x69\x6f\156\137\141\165\164\150")) { goto yygEN; } goto WN0ve; qMxlV: $this->db->where("\154\x6f\x67\151\156", $identity); goto etZcQ; LpfqZ: yygEN: goto iYzjv; OHaiU: $this->db->order_by("\151\144", "\144\x65\x73\143"); goto vAnNq; VnnXh: QE4NT: goto OHaiU; kxKHh: if (!($qres->num_rows() > 0)) { goto G2Fn6; } goto hWOLQ; hWOLQ: return $qres->row()->time; goto dXn9c; RH1NZ: } public function get_last_attempt_ip($identity) { goto A3XNV; MnKal: eG7ze: goto YRaHW; w8SL0: if (!($qres->num_rows() > 0)) { goto eG7ze; } goto Cbh2b; mxgc8: return ''; goto E2cbb; Yd6XL: $qres = $this->db->get($this->tables["\154\157\x67\x69\x6e\x5f\x61\x74\164\x65\x6d\x70\164\163"], 1); goto w8SL0; Cbh2b: return $qres->row()->ip_address; goto MnKal; vfe5c: $this->db->order_by("\151\x64", "\x64\x65\163\x63"); goto Yd6XL; sth5Q: $this->db->select("\151\x70\137\x61\144\144\x72\145\x73\x73"); goto F_yf3; F_yf3: $this->db->where("\x6c\x6f\147\151\x6e", $identity); goto vfe5c; A3XNV: if (!($this->config->item("\x74\162\141\x63\x6b\137\x6c\157\147\x69\156\x5f\x61\164\164\x65\155\160\164\163", "\x69\157\156\x5f\141\x75\x74\x68") && $this->config->item("\x74\162\141\x63\153\x5f\154\x6f\147\151\x6e\x5f\151\160\137\x61\x64\144\162\145\163\x73", "\x69\157\x6e\x5f\141\x75\164\x68"))) { goto M10Le; } goto sth5Q; YRaHW: M10Le: goto mxgc8; E2cbb: } public function increase_login_attempts($identity) { goto XWAZn; NPUeO: return $this->db->insert($this->tables["\x6c\157\147\x69\x6e\x5f\x61\164\164\x65\155\160\x74\163"], $data); goto UlZ2y; JqG3g: return FALSE; goto yhi5W; o1rpx: q2nbh: goto NPUeO; LhiVf: if (!$this->config->item("\x74\162\141\143\153\x5f\x6c\x6f\x67\x69\156\137\x69\160\x5f\141\144\x64\x72\x65\x73\x73", "\x69\x6f\156\x5f\141\x75\164\x68")) { goto q2nbh; } goto gNPes; UlZ2y: BDwDL: goto JqG3g; gNPes: $data["\151\160\137\x61\x64\144\162\145\x73\x73"] = $this->input->ip_address(); goto o1rpx; Bc4jQ: $data = ["\x69\160\137\x61\x64\x64\162\x65\x73\x73" => '', "\154\157\x67\x69\156" => $identity, "\164\151\155\145" => time()]; goto LhiVf; XWAZn: if (!$this->config->item("\164\x72\141\143\153\x5f\x6c\157\147\x69\x6e\x5f\x61\164\164\x65\x6d\x70\164\x73", "\x69\157\156\137\x61\x75\164\150")) { goto BDwDL; } goto Bc4jQ; yhi5W: } public function clear_login_attempts($identity, $old_attempts_expire_period = 86400, $ip_address = NULL) { goto w1cW8; w1cW8: if (!$this->config->item("\164\x72\141\143\153\137\154\x6f\x67\151\156\137\x61\x74\164\145\x6d\160\164\x73", "\x69\x6f\156\137\141\x75\164\150")) { goto RFrnh; } goto CNoPF; B82Vq: return FALSE; goto ET_AB; YQ1Pc: return $this->db->delete($this->tables["\154\157\147\151\x6e\x5f\x61\164\164\145\x6d\x70\x74\x73"]); goto btfJa; L34yI: $this->db->or_where("\164\151\x6d\x65\40\x3c", time() - $old_attempts_expire_period, FALSE); goto YQ1Pc; vYEVY: WoyLv: goto L34yI; ryw25: if (isset($ip_address)) { goto c16O2; } goto CukIk; CNoPF: $old_attempts_expire_period = max($old_attempts_expire_period, $this->config->item("\154\x6f\143\153\157\x75\x74\x5f\164\x69\x6d\x65", "\x69\x6f\x6e\x5f\141\x75\x74\150")); goto wrUHd; ashVN: $this->db->where("\151\x70\137\141\x64\144\x72\x65\x73\163", $ip_address); goto vYEVY; CukIk: $ip_address = $this->input->ip_address(); goto mJQ05; wrUHd: $this->db->where("\x6c\157\x67\x69\x6e", $identity); goto Xpt20; btfJa: RFrnh: goto B82Vq; mJQ05: c16O2: goto ashVN; Xpt20: if (!$this->config->item("\x74\x72\141\x63\153\137\154\x6f\x67\x69\x6e\137\151\x70\137\x61\x64\x64\162\145\x73\x73", "\151\157\x6e\137\141\165\x74\x68")) { goto WoyLv; } goto ryw25; ET_AB: } public function limit($limit) { goto DH0hz; UawS9: return $this; goto iXMgY; DH0hz: $this->trigger_events("\154\x69\x6d\x69\164"); goto YxBps; YxBps: $this->_ion_limit = $limit; goto UawS9; iXMgY: } public function offset($offset) { goto jwL73; hv0gB: return $this; goto DNiI2; uF61v: $this->_ion_offset = $offset; goto hv0gB; jwL73: $this->trigger_events("\x6f\x66\x66\163\145\164"); goto uF61v; DNiI2: } public function where($where, $value = NULL) { goto ekCJr; FJ674: n8aEX: goto z2cbd; PGgax: $where = [$where => $value]; goto FJ674; q25a0: return $this; goto IDo2I; z2cbd: array_push($this->_ion_where, $where); goto q25a0; ekCJr: $this->trigger_events("\x77\150\x65\x72\145"); goto RWvps; RWvps: if (is_array($where)) { goto n8aEX; } goto PGgax; IDo2I: } public function like($like, $value = NULL, $position = "\x62\x6f\164\x68") { goto n9WD1; n9WD1: $this->trigger_events("\154\x69\x6b\x65"); goto wtOXg; wtOXg: array_push($this->_ion_like, ["\154\x69\153\x65" => $like, "\166\x61\x6c\165\x65" => $value, "\160\157\163\151\x74\151\157\x6e" => $position]); goto DRTJ4; DRTJ4: return $this; goto BCALw; BCALw: } public function select($select) { goto rf30_; rf30_: $this->trigger_events("\x73\x65\x6c\145\x63\164"); goto Vi0DN; qVC1o: return $this; goto eM9zN; Vi0DN: $this->_ion_select[] = $select; goto qVC1o; eM9zN: } public function order_by($by, $order = "\x64\x65\163\x63") { goto D9VlF; RwrpP: return $this; goto Sqxli; F75b8: $this->_ion_order_by = $by; goto UkLrS; UkLrS: $this->_ion_order = $order; goto RwrpP; D9VlF: $this->trigger_events("\x6f\x72\x64\x65\162\137\142\171"); goto F75b8; Sqxli: } public function row() { goto R2cSR; lnzxz: $row = $this->response->row(); goto gwddZ; R2cSR: $this->trigger_events("\162\x6f\167"); goto lnzxz; gwddZ: return $row; goto rDx4h; rDx4h: } public function row_array() { goto f3EA8; f3EA8: $this->trigger_events(["\x72\x6f\x77", "\162\157\x77\x5f\x61\x72\162\141\171"]); goto ZYk0T; ZYk0T: $row = $this->response->row_array(); goto zAIAr; zAIAr: return $row; goto DJxc4; DJxc4: } public function result() { goto v5bJW; Om_rz: $result = $this->response->result(); goto ZlTrJ; v5bJW: $this->trigger_events("\162\145\x73\165\154\164"); goto Om_rz; ZlTrJ: return $result; goto Tar1y; Tar1y: } public function result_array() { goto vaG1B; CvAhN: return $result; goto AqfQG; R5cbA: $result = $this->response->result_array(); goto CvAhN; vaG1B: $this->trigger_events(["\162\x65\x73\x75\x6c\x74", "\162\145\163\165\154\164\x5f\x61\162\x72\x61\171"]); goto R5cbA; AqfQG: } public function num_rows() { goto WszbE; a0JHY: return $result; goto BIO5a; TDPU3: $result = $this->response->num_rows(); goto a0JHY; WszbE: $this->trigger_events(["\x6e\165\x6d\137\162\x6f\x77\163"]); goto TDPU3; BIO5a: } public function users($groups = NULL) { goto AX4m5; mJlJt: $this->db->select([$this->tables["\x75\163\145\x72\163"] . "\56\52", $this->tables["\x75\163\145\x72\163"] . "\x2e\x69\144\40\x61\163\x20\151\144", $this->tables["\x75\163\x65\162\163"] . "\x2e\x69\x64\40\141\x73\x20\165\x73\x65\x72\x5f\151\x64"]); goto HFviN; l3kyr: $this->db->distinct(); goto Ym8nO; tamq9: if (empty($group_ids)) { goto t640x; } goto VMEV6; cS5KE: $this->db->limit($this->_ion_limit, $this->_ion_offset); goto XA6Of; zNwC2: PwVxi: goto m78FN; GjJET: I6fWa: goto m1810; IBDsP: if (!(isset($groups) && !empty($groups))) { goto uUEue; } goto l3kyr; GDuoF: t640x: goto wfDuW; M19JB: if (!isset($this->_ion_limit)) { goto Joead; } goto Ouemd; ZewNm: return $this; goto P19jc; yiQjx: $this->db->order_by($this->_ion_order_by, $this->_ion_order); goto Ex8PC; hAo13: $this->_ion_where = []; goto zNwC2; m1810: $this->_ion_select = []; goto d_4h5; fW3nG: $this->db->where_in($this->tables["\147\x72\x6f\x75\160\163"] . "\x2e\156\x61\x6d\x65", $group_names); goto VfilB; wLH_f: roUPL: goto ifQ2j; NfbqQ: IC8GE: goto IBDsP; rstFM: $this->db->join($this->tables["\x67\x72\157\165\x70\x73"], $this->tables["\x75\163\x65\x72\x73\x5f\x67\x72\157\x75\160\x73"] . "\x2e" . $this->join["\x67\162\x6f\x75\x70\x73"] . "\40\x3d\40" . $this->tables["\147\162\157\165\x70\x73"] . "\x2e\x69\144", "\151\x6e\x6e\x65\162"); goto fW3nG; WF4d_: rrndl: goto AvF_n; d_4h5: dYGMl: goto GCGXK; vuzFx: $or_where_in = !empty($group_ids) && !empty($group_names) ? "\157\x72\137\167\x68\x65\162\145\x5f\151\x6e" : "\167\x68\x65\162\145\x5f\151\156"; goto rJkES; Ia7mH: $this->_ion_like = []; goto WF4d_; KajyI: k9r5H: goto rR3DN; g8_EB: ky1ZK: goto Ia7mH; ZGQub: foreach ($this->_ion_like as $like) { $this->db->or_like($like["\154\151\x6b\x65"], $like["\166\141\x6c\165\145"], $like["\160\x6f\163\x69\x74\151\x6f\x6e"]); u9vch: } goto g8_EB; AvF_n: if (isset($this->_ion_limit) && isset($this->_ion_offset)) { goto EPQfm; } goto M19JB; ifQ2j: if (!(isset($this->_ion_order_by) && isset($this->_ion_order))) { goto k9r5H; } goto yiQjx; ZelJS: $this->_ion_offset = NULL; goto wLH_f; Ouemd: $this->db->limit($this->_ion_limit); goto PfYRS; m78FN: if (!(isset($this->_ion_like) && !empty($this->_ion_like))) { goto rrndl; } goto ZGQub; VMEV6: $this->db->{$or_where_in}($this->tables["\x75\163\145\x72\x73\x5f\147\162\157\x75\160\x73"] . "\x2e" . $this->join["\147\x72\x6f\165\x70\x73"], $group_ids); goto GDuoF; MUDgG: foreach ($groups as $group) { goto Aqmx2; EdJQs: $group_names[] = $group; goto bovbt; CVzpo: PkXY3: goto Db86q; Aqmx2: if (is_numeric($group)) { goto PkXY3; } goto EdJQs; bovbt: goto arLX3; goto CVzpo; Db86q: $group_ids[] = $group; goto H5W4d; H5W4d: arLX3: goto UQcfw; UQcfw: RagLD: goto KzPaD; KzPaD: } goto j7cRi; XA6Of: $this->_ion_limit = NULL; goto ZelJS; WgAI2: if (is_array($groups)) { goto IC8GE; } goto qcARt; qcARt: $groups = [$groups]; goto NfbqQ; j7cRi: VGadx: goto vuzFx; GCGXK: if (!isset($groups)) { goto QjX8g; } goto WgAI2; lDsHG: if (isset($this->_ion_select) && !empty($this->_ion_select)) { goto XOtVc; } goto mJlJt; gMqCe: XOtVc: goto X4SmS; eSxDd: $group_names = []; goto MUDgG; W6l9K: foreach ($this->_ion_where as $where) { $this->db->where($where); jNuCV: } goto HdOcY; AX4m5: $this->trigger_events("\165\x73\x65\162\163"); goto lDsHG; glIAA: EPQfm: goto cS5KE; n7pd5: $group_ids = []; goto eSxDd; PfYRS: $this->_ion_limit = NULL; goto Q1Jgb; HFviN: goto dYGMl; goto gMqCe; Q1Jgb: Joead: goto ExveS; eWx3M: $this->trigger_events("\x65\x78\164\162\x61\137\167\150\145\x72\x65"); goto DFGrP; ExveS: goto roUPL; goto glIAA; DFGrP: if (!(isset($this->_ion_where) && !empty($this->_ion_where))) { goto PwVxi; } goto W6l9K; rR3DN: $this->response = $this->db->get($this->tables["\165\x73\145\162\x73"]); goto ZewNm; g1caO: $this->_ion_order_by = NULL; goto KajyI; HdOcY: itIIF: goto hAo13; Ex8PC: $this->_ion_order = NULL; goto g1caO; Ym8nO: $this->db->join($this->tables["\165\163\x65\x72\163\137\x67\x72\x6f\x75\x70\163"], $this->tables["\165\163\145\x72\163\x5f\x67\x72\x6f\x75\x70\x73"] . "\x2e" . $this->join["\x75\x73\145\162\163"] . "\75" . $this->tables["\165\x73\x65\162\163"] . "\x2e\151\x64", "\x69\x6e\156\x65\x72"); goto WPQZU; wfDuW: QjX8g: goto eWx3M; WPQZU: uUEue: goto n7pd5; VfilB: Q2n8_: goto tamq9; rJkES: if (empty($group_names)) { goto Q2n8_; } goto rstFM; X4SmS: foreach ($this->_ion_select as $select) { $this->db->select($select); qBUoE: } goto GjJET; P19jc: } public function user($id = NULL) { goto GIMn9; IhbW1: $this->order_by($this->tables["\165\x73\x65\162\x73"] . "\56\151\x64", "\x64\145\x73\143"); goto pMA08; pMA08: $this->where($this->tables["\165\163\x65\x72\x73"] . "\56\x69\144", $id); goto nT9Jy; hDUeq: $id = isset($id) ? $id : $this->session->userdata("\x75\x73\x65\162\137\x69\x64"); goto c2zyE; GIMn9: $this->trigger_events("\165\x73\x65\x72"); goto hDUeq; nT9Jy: $this->users(); goto GbFdR; GbFdR: return $this; goto uyRzZ; c2zyE: $this->limit(1); goto IhbW1; uyRzZ: } public function get_users_groups($id = FALSE) { goto EzSB0; EzSB0: $this->trigger_events("\x67\145\164\x5f\x75\163\145\x72\x73\137\x67\162\157\165\160"); goto zzN1o; zzN1o: $id || ($id = $this->session->userdata("\165\x73\x65\x72\137\151\144")); goto TnWha; TnWha: return $this->db->select($this->tables["\x75\163\145\x72\163\137\147\162\157\x75\160\163"] . "\56" . $this->join["\x67\162\157\x75\x70\163"] . "\x20\141\x73\x20\151\144\x2c\40" . $this->tables["\147\x72\157\x75\x70\x73"] . "\56\x6e\x61\155\145\x2c\x20" . $this->tables["\147\162\x6f\x75\x70\x73"] . "\56\x64\x65\163\x63\162\x69\160\164\x69\157\156")->where($this->tables["\x75\x73\x65\x72\163\137\x67\x72\157\x75\160\x73"] . "\x2e" . $this->join["\x75\163\x65\x72\x73"], $id)->join($this->tables["\147\x72\x6f\165\160\x73"], $this->tables["\x75\x73\x65\162\x73\137\x67\x72\157\x75\x70\163"] . "\56" . $this->join["\x67\162\157\x75\x70\x73"] . "\75" . $this->tables["\147\162\157\165\x70\x73"] . "\x2e\x69\144")->get($this->tables["\165\163\x65\162\x73\137\x67\x72\x6f\165\x70\x73"]); goto XPBAD; XPBAD: } public function in_group($check_group, $id = FALSE, $check_all = FALSE) { goto C3YLs; ebQSm: DTAUR: goto RDxDH; XYSJp: $groups_array = $this->_cache_user_in_group[$id]; goto ebQSm; ArphN: if (is_array($check_group)) { goto EbGF5; } goto cUSZd; C3YLs: $this->trigger_events("\151\x6e\137\147\x72\x6f\x75\x70"); goto kW1K5; xio_3: $groups_array = []; goto aZsp6; YBuHm: hm0NF: goto XYSJp; KdAz7: goto DTAUR; goto YBuHm; QbamW: return $check_all; goto T3lBF; APhMY: $users_groups = $this->get_users_groups($id)->result(); goto xio_3; pFbYy: if (isset($this->_cache_user_in_group[$id])) { goto hm0NF; } goto APhMY; pGpTo: $this->_cache_user_in_group[$id] = $groups_array; goto KdAz7; cUSZd: $check_group = [$check_group]; goto pQxDr; Nk2wd: OqQvw: goto pGpTo; D6ybs: VzHnO: goto QbamW; kW1K5: $id || ($id = $this->session->userdata("\165\x73\x65\162\x5f\x69\144")); goto ArphN; pQxDr: EbGF5: goto pFbYy; aZsp6: foreach ($users_groups as $group) { $groups_array[$group->id] = $group->name; HApGU: } goto Nk2wd; RDxDH: foreach ($check_group as $key => $value) { goto KxFKi; dktE4: TogiP: goto qpu30; CcIFE: return !$check_all; goto dktE4; qpu30: fEqAo: goto o5NfJ; M_HMG: if (!(in_array($value, $groups) xor $check_all)) { goto TogiP; } goto CcIFE; KxFKi: $groups = is_numeric($value) ? array_keys($groups_array) : $groups_array; goto M_HMG; o5NfJ: } goto D6ybs; T3lBF: } public function add_to_group($group_ids, $user_id = FALSE) { goto b2RjB; gwyX2: $user_id || ($user_id = $this->session->userdata("\x75\x73\145\x72\137\151\144")); goto cRYwb; KFqyg: foreach ($group_ids as $group_id) { goto IzxJU; syiup: $this->_cache_user_in_group[$user_id][$group_id] = $group_name; goto x_Vdu; IzxJU: if (!$this->db->insert($this->tables["\165\163\x65\x72\x73\137\147\x72\x6f\x75\160\x73"], [$this->join["\147\x72\x6f\165\160\163"] => (float) $group_id, $this->join["\165\x73\x65\162\163"] => (float) $user_id])) { goto LJ9LV; } goto pIsBm; gCSVE: M8Y7r: goto YmSY7; yGlEr: $group_name = $group[0]->name; goto drXu3; xj2UK: nTLla: goto rLxD1; L0YfS: LJ9LV: goto xj2UK; WeMVt: goto GH3R0; goto gCSVE; drXu3: $this->_cache_groups[$group_id] = $group_name; goto WeMVt; jcB2a: $group = $this->group($group_id)->result(); goto yGlEr; x_Vdu: $return++; goto L0YfS; pIsBm: if (isset($this->_cache_groups[$group_id])) { goto M8Y7r; } goto jcB2a; h9OxV: GH3R0: goto syiup; YmSY7: $group_name = $this->_cache_groups[$group_id]; goto h9OxV; rLxD1: } goto GDUxY; GDUxY: sI7D7: goto bXRAK; bXRAK: return $return; goto A6dRL; cRYwb: if (is_array($group_ids)) { goto I2S_i; } goto veekP; WXZ99: I2S_i: goto SoP_m; SoP_m: $return = 0; goto KFqyg; veekP: $group_ids = [$group_ids]; goto WXZ99; b2RjB: $this->trigger_events("\x61\144\x64\x5f\x74\157\137\x67\162\157\x75\160"); goto gwyX2; A6dRL: } public function remove_from_group($group_ids = FALSE, $user_id = FALSE) { goto z_jG9; p5R5s: foreach ($group_ids as $group_id) { goto jrB2r; jrB2r: $this->db->delete($this->tables["\165\x73\x65\162\x73\137\x67\162\x6f\x75\x70\x73"], [$this->join["\x67\162\157\165\160\163"] => (float) $group_id, $this->join["\x75\163\145\x72\163"] => (float) $user_id]); goto Cl4qG; Cl4qG: if (!(isset($this->_cache_user_in_group[$user_id]) && isset($this->_cache_user_in_group[$user_id][$group_id]))) { goto FZghj; } goto RJJ0K; QC6JT: j5wv0: goto ikStf; RJJ0K: unset($this->_cache_user_in_group[$user_id][$group_id]); goto XKAHl; XKAHl: FZghj: goto QC6JT; ikStf: } goto z1QgQ; hiPXE: $group_ids = [$group_ids]; goto lXBzn; z1QgQ: mm0gs: goto j2UuE; QVuY_: if (!empty($group_ids)) { goto VkRHX; } goto UBmay; LQFUb: y8K5F: goto QVuY_; lXBzn: ooH03: goto p5R5s; cN6zu: NM5nI: goto n3Wne; n3Wne: goto Zk7kP; goto lSHf_; EMWZy: if (is_array($group_ids)) { goto ooH03; } goto hiPXE; ge3b3: return $return; goto i0bp7; mKvR_: return FALSE; goto LQFUb; lSHf_: VkRHX: goto EMWZy; UBmay: if (!($return = $this->db->delete($this->tables["\x75\x73\145\x72\163\x5f\147\x72\x6f\165\x70\163"], [$this->join["\165\163\x65\x72\x73"] => (float) $user_id]))) { goto NM5nI; } goto R2Qxq; dxEM1: if (!empty($user_id)) { goto y8K5F; } goto mKvR_; j2UuE: $return = TRUE; goto Qr9Nw; R2Qxq: $this->_cache_user_in_group[$user_id] = []; goto cN6zu; z_jG9: $this->trigger_events("\162\145\155\x6f\166\145\137\146\162\x6f\155\x5f\x67\x72\157\x75\x70"); goto dxEM1; Qr9Nw: Zk7kP: goto ge3b3; i0bp7: } public function groups() { goto MSgyY; stEQR: $this->db->limit($this->_ion_limit, $this->_ion_offset); goto jk61i; hYYWv: $this->_ion_where = []; goto bhZvH; OIJ5y: goto tzWrM; goto SHYRk; ALjuh: if (!(isset($this->_ion_order_by) && isset($this->_ion_order))) { goto tGhWM; } goto R708N; I4off: if (isset($this->_ion_limit) && isset($this->_ion_offset)) { goto mR2vH; } goto Gu4f2; bhZvH: FcaFr: goto I4off; RQTzS: tzWrM: goto ALjuh; y8fie: $this->_ion_limit = NULL; goto iD62b; Gu4f2: if (!isset($this->_ion_limit)) { goto xwmzK; } goto yGEFj; iD62b: xwmzK: goto OIJ5y; Kcf6J: tGhWM: goto IKd1H; xuKTj: $this->_ion_offset = NULL; goto RQTzS; paPXd: return $this; goto h0Eqk; DhC_G: if (!(isset($this->_ion_where) && !empty($this->_ion_where))) { goto FcaFr; } goto NmL6W; NmL6W: foreach ($this->_ion_where as $where) { $this->db->where($where); t5Wtw: } goto DcWM0; SHYRk: mR2vH: goto stEQR; IKd1H: $this->response = $this->db->get($this->tables["\x67\x72\x6f\x75\160\x73"]); goto paPXd; jk61i: $this->_ion_limit = NULL; goto xuKTj; R708N: $this->db->order_by($this->_ion_order_by, $this->_ion_order); goto Kcf6J; MSgyY: $this->trigger_events("\147\162\x6f\165\x70\163"); goto DhC_G; yGEFj: $this->db->limit($this->_ion_limit); goto y8fie; DcWM0: ySmQP: goto hYYWv; h0Eqk: } public function group($id = NULL) { goto BBOnL; BBOnL: $this->trigger_events("\x67\162\x6f\x75\x70"); goto dn822; mHYP6: $this->limit(1); goto mVQc6; B5t9m: WeCAr: goto mHYP6; dn822: if (!isset($id)) { goto WeCAr; } goto GE69_; GE69_: $this->where($this->tables["\147\162\157\x75\160\x73"] . "\x2e\151\x64", $id); goto B5t9m; W96br: return $this->groups(); goto EZa5k; mVQc6: $this->order_by("\x69\x64", "\x64\145\x73\143"); goto W96br; EZa5k: } public function update($id, array $data) { goto igyD4; Q3Zbz: $this->trigger_events(["\160\x6f\x73\164\137\165\160\144\141\164\x65\x5f\165\x73\145\162", "\160\157\x73\164\x5f\165\160\x64\x61\x74\145\137\x75\163\145\162\x5f\165\x6e\x73\x75\143\x63\145\163\163\146\x75\154"]); goto DRG0N; jbhy8: unset($data["\x70\141\163\163\x77\x6f\162\x64"]); goto y9jQK; xjigP: UySe9: goto lKMbi; xU0c3: return FALSE; goto e1QHT; HPjO0: $this->set_error("\x61\143\143\x6f\165\156\x74\137\143\162\145\141\164\x69\157\x6e\137\144\165\160\154\x69\x63\141\x74\x65\137\x69\x64\x65\156\164\151\x74\171"); goto DuANW; SW4ny: $this->db->trans_begin(); goto yd1BI; ez7qf: $this->set_error("\x75\160\x64\141\164\145\x5f\165\x6e\163\x75\x63\x63\145\163\x73\146\x75\x6c"); goto WzZ0j; DuANW: $this->trigger_events(["\160\x6f\x73\x74\x5f\165\x70\x64\141\164\145\x5f\165\163\x65\162", "\x70\157\x73\x74\137\165\x70\x64\141\164\145\x5f\165\163\x65\162\137\x75\x6e\x73\165\143\x63\x65\163\163\x66\165\x6c"]); goto mhpCr; w5QXT: $this->db->trans_commit(); goto Wl8mt; mhpCr: $this->set_error("\x75\x70\x64\x61\164\x65\137\x75\x6e\x73\x75\x63\x63\145\x73\x73\146\x75\x6c"); goto xU0c3; IiVYb: if (!(array_key_exists($this->identity_column, $data) || array_key_exists("\x70\x61\x73\x73\167\x6f\162\144", $data) || array_key_exists("\x65\155\141\x69\x6c", $data))) { goto zP8WL; } goto a4Km9; d26oO: $this->db->trans_rollback(); goto Q3Zbz; hVgfX: $this->trigger_events("\145\x78\x74\162\x61\x5f\x77\150\x65\162\145"); goto N4I_q; AJC8K: $this->db->trans_rollback(); goto HPjO0; rfRiQ: if (!($data["\160\141\163\163\x77\157\162\144"] === FALSE)) { goto dV5_5; } goto OWq0R; x9Oa6: $user = $this->user($id)->row(); goto SW4ny; PfLYd: return TRUE; goto t1wR4; D_IG9: s8gsm: goto w5QXT; zA2vw: zP8WL: goto hVgfX; e1QHT: Ak0kK: goto WYi0x; WzZ0j: return FALSE; goto qAUPl; DRG0N: $this->set_error("\x75\x70\144\141\x74\145\x5f\165\x6e\x73\165\x63\x63\x65\x73\x73\x66\165\154"); goto fiScr; a4Km9: if (!array_key_exists("\x70\141\163\x73\167\157\x72\144", $data)) { goto xCpxt; } goto s7ogR; WYi0x: $data = $this->_filter_data($this->tables["\x75\163\145\162\x73"], $data); goto IiVYb; s7ogR: if (!empty($data["\160\141\x73\163\167\157\162\x64"])) { goto UySe9; } goto jbhy8; y9jQK: goto IYSFs; goto xjigP; QE3dA: $this->set_message("\x75\x70\144\x61\164\x65\137\x73\x75\143\143\x65\163\x73\x66\x75\x6c"); goto PfLYd; igyD4: $this->trigger_events("\160\162\x65\137\x75\160\x64\x61\x74\x65\x5f\165\x73\145\162"); goto x9Oa6; u3vk6: IYSFs: goto ywSnZ; Wl8mt: $this->trigger_events(["\160\157\x73\x74\x5f\165\160\x64\x61\x74\x65\x5f\x75\163\x65\162", "\160\157\x73\x74\137\x75\160\x64\141\164\x65\137\165\163\145\x72\x5f\163\165\143\x63\x65\x73\x73\x66\165\x6c"]); goto QE3dA; lKMbi: $data["\160\x61\163\163\x77\157\x72\144"] = $this->hash_password($data["\160\x61\x73\x73\x77\x6f\x72\x64"], $user->{$this->identity_column}); goto rfRiQ; ywSnZ: xCpxt: goto zA2vw; N4I_q: $this->db->update($this->tables["\165\163\145\x72\x73"], $data, ["\x69\x64" => $user->id]); goto h4Vx2; OWq0R: $this->db->trans_rollback(); goto X0q7K; h4Vx2: if (!($this->db->trans_status() === FALSE)) { goto s8gsm; } goto d26oO; X0q7K: $this->trigger_events(["\x70\x6f\x73\164\137\165\x70\x64\141\164\x65\137\x75\163\x65\x72", "\160\x6f\x73\x74\137\x75\x70\144\x61\164\x65\137\x75\x73\x65\162\x5f\x75\156\x73\165\143\x63\x65\x73\163\146\165\x6c"]); goto ez7qf; qAUPl: dV5_5: goto u3vk6; fiScr: return FALSE; goto D_IG9; yd1BI: if (!(array_key_exists($this->identity_column, $data) && $this->identity_check($data[$this->identity_column]) && $user->{$this->identity_column} !== $data[$this->identity_column])) { goto Ak0kK; } goto AJC8K; t1wR4: } public function delete_user($id) { goto rh_bE; OJO5v: return FALSE; goto oivQL; egr08: $this->trigger_events(["\160\x6f\x73\164\137\144\145\x6c\145\x74\145\x5f\165\x73\145\x72", "\x70\157\x73\x74\x5f\x64\145\x6c\145\x74\x65\137\165\x73\x65\x72\137\163\x75\143\x63\145\163\163\146\165\154"]); goto iBNek; bZN1m: $this->trigger_events(["\160\x6f\163\x74\137\144\145\x6c\x65\x74\x65\137\x75\163\x65\162", "\x70\157\163\164\x5f\144\145\154\x65\164\x65\x5f\x75\163\x65\162\x5f\165\156\163\165\143\143\x65\163\x73\146\165\154"]); goto OZQyQ; rh_bE: $this->trigger_events("\160\x72\x65\x5f\144\145\154\x65\x74\145\x5f\165\163\145\x72"); goto vXhsE; nzEll: $this->db->trans_rollback(); goto bZN1m; oivQL: ImLUA: goto hvo9E; m1ZI5: if (!($this->db->trans_status() === FALSE)) { goto ImLUA; } goto nzEll; GX2pp: $this->db->delete($this->tables["\x75\163\145\x72\x73"], ["\151\144" => $id]); goto m1ZI5; vXhsE: $this->db->trans_begin(); goto U34Rm; iBNek: $this->set_message("\144\x65\154\x65\x74\x65\x5f\x73\165\x63\143\x65\163\x73\146\x75\154"); goto UVprM; hvo9E: $this->db->trans_commit(); goto egr08; U34Rm: $this->remove_from_group(NULL, $id); goto GX2pp; OZQyQ: $this->set_error("\144\x65\154\x65\164\145\x5f\165\156\x73\165\x63\143\x65\163\163\x66\x75\154"); goto OJO5v; UVprM: return TRUE; goto QmiKh; QmiKh: } public function update_last_login($id) { goto ixjkY; iRIYM: $this->db->update($this->tables["\165\163\x65\x72\163"], ["\x6c\x61\x73\164\x5f\154\x6f\147\151\156" => time()], ["\x69\x64" => $id]); goto dUJtl; TrqTJ: $this->load->helper("\x64\x61\x74\145"); goto MqDxQ; ixjkY: $this->trigger_events("\x75\160\x64\x61\x74\145\x5f\x6c\x61\163\164\137\154\157\x67\x69\x6e"); goto TrqTJ; MqDxQ: $this->trigger_events("\x65\170\164\x72\x61\x5f\167\150\145\162\x65"); goto iRIYM; dUJtl: return $this->db->affected_rows() == 1; goto VjkpX; VjkpX: } public function set_lang($lang = "\145\156") { goto X3_D2; qdxkU: return TRUE; goto DgtqA; tTUSa: he8cL: goto g5SQR; UVn5S: if ($this->config->item("\165\x73\145\162\137\145\170\160\x69\162\x65", "\x69\x6f\x6e\x5f\141\165\x74\x68") === 0) { goto P0gue; } goto FfnQj; X3_D2: $this->trigger_events("\163\145\164\x5f\x6c\141\x6e\147"); goto UVn5S; VKChs: $expire = self::MAX_COOKIE_LIFETIME; goto tTUSa; zZ_0Q: goto he8cL; goto JQb1g; FfnQj: $expire = $this->config->item("\x75\x73\145\x72\137\x65\170\160\x69\x72\x65", "\x69\x6f\156\x5f\141\165\x74\x68"); goto zZ_0Q; JQb1g: P0gue: goto VKChs; g5SQR: set_cookie(["\x6e\x61\155\x65" => "\154\x61\x6e\x67\x5f\x63\x6f\x64\145", "\x76\x61\154\165\145" => $lang, "\145\170\x70\151\x72\x65" => $expire]); goto qdxkU; DgtqA: } public function set_session($user) { goto ik7xh; L17I6: $this->trigger_events("\160\157\x73\x74\137\163\145\x74\x5f\163\x65\163\x73\x69\157\x6e"); goto CxaFO; CxaFO: return TRUE; goto CE8v1; zg1Di: $this->session->set_userdata($session_data); goto L17I6; ik7xh: $this->trigger_events("\160\162\145\x5f\x73\x65\x74\137\163\x65\163\163\151\x6f\x6e"); goto Uolbi; Uolbi: $session_data = ["\x69\144\x65\156\x74\151\x74\171" => $user->{$this->identity_column}, $this->identity_column => $user->{$this->identity_column}, "\145\155\141\x69\154" => $user->email, "\x75\163\x65\162\137\x69\144" => $user->id, "\157\154\x64\x5f\154\x61\163\x74\137\x6c\x6f\x67\x69\x6e" => $user->last_login, "\x6c\x61\x73\x74\137\x63\150\145\143\x6b" => time()]; goto zg1Di; CE8v1: } public function remember_user($identity) { goto YmGIQ; q6G8F: $expire = self::MAX_COOKIE_LIFETIME; goto y73in; NAyUZ: $this->trigger_events(["\160\x6f\x73\164\137\162\145\x6d\145\x6d\x62\x65\x72\x5f\165\x73\145\162", "\162\145\x6d\145\155\142\x65\162\x5f\x75\x73\145\162\137\x73\x75\x63\143\145\163\163\146\165\154"]); goto Bshur; N7Dlk: ff3Wl: goto q6G8F; Bshur: return TRUE; goto hoSUd; zjk_g: if (!$token->validator_hashed) { goto hfx_B; } goto RhjD1; QU3WF: hfx_B: goto A27RF; SpbEu: goto etGIt; goto N7Dlk; O7uof: set_cookie(["\x6e\141\155\x65" => $this->config->item("\x72\x65\155\x65\x6d\142\x65\x72\x5f\143\x6f\x6f\153\151\x65\x5f\156\x61\155\x65", "\151\x6f\x6e\137\141\x75\x74\150"), "\x76\x61\154\165\145" => $token->user_code, "\x65\170\160\x69\x72\145" => $expire]); goto NAyUZ; Ien_Y: $expire = $this->config->item("\165\163\x65\x72\137\x65\170\x70\x69\x72\x65", "\x69\157\x6e\x5f\141\x75\164\x68"); goto SpbEu; gGATT: return FALSE; goto Os4u4; r7qkM: if (!($this->db->affected_rows() > -1)) { goto ZSabb; } goto stLqu; YmGIQ: $this->trigger_events("\160\x72\145\x5f\162\x65\155\145\155\142\x65\x72\137\x75\163\x65\x72"); goto rN2ua; hoSUd: ZSabb: goto QU3WF; A27RF: $this->trigger_events(["\x70\x6f\163\x74\137\162\x65\x6d\x65\x6d\142\x65\x72\x5f\165\163\x65\162", "\x72\x65\155\145\155\142\x65\162\x5f\165\163\145\162\137\x75\x6e\163\165\143\143\x65\x73\163\x66\x75\x6c"]); goto gGATT; FDbua: return FALSE; goto l8CMl; y73in: etGIt: goto O7uof; l7AgL: $token = $this->_generate_selector_validator_couple(); goto zjk_g; l8CMl: wy801: goto l7AgL; stLqu: if ($this->config->item("\165\163\145\x72\137\x65\170\x70\x69\162\145", "\151\157\x6e\137\x61\x75\x74\150") === 0) { goto ff3Wl; } goto Ien_Y; RhjD1: $this->db->update($this->tables["\x75\163\x65\162\x73"], ["\162\145\x6d\145\155\x62\x65\x72\137\163\x65\154\x65\x63\164\x6f\162" => $token->selector, "\162\145\x6d\145\155\x62\x65\162\137\x63\157\144\x65" => $token->validator_hashed], [$this->identity_column => $identity]); goto r7qkM; rN2ua: if ($identity) { goto wy801; } goto FDbua; Os4u4: } public function login_remembered_user() { goto OCa55; z03v9: $this->session->sess_regenerate(FALSE); goto rolxj; pcN1s: $identity = $user->{$this->identity_column}; goto qZbRB; qlv5R: wGX5b: goto XPZ0c; rolxj: $this->trigger_events(["\x70\x6f\163\164\x5f\154\x6f\x67\x69\x6e\137\162\x65\x6d\x65\x6d\x62\145\x72\x65\144\x5f\165\x73\x65\162", "\x70\157\x73\164\x5f\x6c\157\147\151\156\x5f\x72\145\155\145\x6d\x62\145\162\145\x64\x5f\165\163\145\162\137\163\165\x63\x63\x65\x73\163\146\165\x6c"]); goto sFOZL; Vtqww: $remember_cookie = get_cookie($this->config->item("\x72\145\155\145\x6d\x62\145\162\137\x63\157\157\153\x69\x65\x5f\156\141\155\145", "\151\x6f\x6e\x5f\141\x75\164\x68")); goto c66xp; c66xp: $token = $this->_retrieve_selector_validator_couple($remember_cookie); goto Q2nnj; ER68j: $this->clear_forgotten_password_code($identity); goto tCLSp; UBt1Q: $user = $query->row(); goto pcN1s; nvD7U: $this->trigger_events(["\160\157\x73\x74\137\x6c\x6f\147\x69\156\x5f\162\x65\155\145\155\x62\x65\162\x65\144\137\165\x73\145\x72", "\160\157\x73\164\x5f\154\x6f\147\151\x6e\x5f\162\x65\x6d\145\155\x62\x65\x72\x65\144\137\x75\x73\145\162\137\x75\156\x73\x75\143\143\145\x73\163\146\165\154"]); goto lj20V; XvfjI: pfUD0: goto z03v9; gyhoe: delete_cookie($this->config->item("\x72\x65\x6d\145\x6d\x62\x65\162\137\143\x6f\x6f\x6b\151\x65\x5f\x6e\x61\x6d\145", "\151\157\156\137\x61\165\164\150")); goto AAUQi; sWvrO: return FALSE; goto ZQOHq; H5mxH: $this->set_session($user); goto ER68j; AAUQi: $this->trigger_events(["\x70\157\163\164\x5f\x6c\157\x67\151\156\137\162\145\155\x65\x6d\x62\x65\x72\x65\x64\x5f\165\x73\145\162", "\160\157\163\x74\x5f\154\x6f\147\151\x6e\x5f\x72\145\155\x65\155\x62\145\x72\x65\x64\137\x75\163\x65\162\137\165\156\x73\165\x63\x63\x65\x73\x73\x66\165\154"]); goto sWvrO; lrgS5: $this->update_last_login($user->id); goto H5mxH; OCa55: $this->trigger_events("\x70\x72\145\x5f\154\157\x67\151\x6e\x5f\162\x65\x6d\x65\155\142\x65\x72\x65\x64\137\x75\163\x65\162"); goto Vtqww; sFOZL: return TRUE; goto eVeFy; tCLSp: if (!$this->config->item("\x75\163\x65\162\137\x65\x78\x74\145\156\x64\x5f\x6f\156\137\154\157\x67\151\x6e", "\x69\157\156\137\x61\165\164\x68")) { goto pfUD0; } goto s8_Mt; s8_Mt: $this->remember_user($identity); goto XvfjI; ovHSj: if (!($query->num_rows() === 1)) { goto aj64t; } goto UBt1Q; XPZ0c: $this->trigger_events("\145\170\164\x72\x61\137\x77\x68\145\x72\x65"); goto WBYfV; n17jr: aj64t: goto gyhoe; qZbRB: if (!$this->verify_password($token->validator, $user->remember_code, $identity)) { goto ZFY3w; } goto lrgS5; WBYfV: $query = $this->db->select($this->identity_column . "\54\40\151\144\x2c\40\145\x6d\141\151\154\x2c\x20\162\145\155\x65\155\142\145\x72\137\x63\x6f\144\x65\x2c\40\154\x61\x73\x74\x5f\154\x6f\147\x69\156")->where("\162\145\155\145\x6d\142\x65\x72\137\163\x65\154\145\143\x74\157\162", $token->selector)->where("\141\x63\164\151\x76\145", 1)->limit(1)->get($this->tables["\x75\163\145\x72\x73"]); goto ovHSj; Q2nnj: if (!($token === FALSE)) { goto wGX5b; } goto nvD7U; eVeFy: ZFY3w: goto n17jr; lj20V: return FALSE; goto qlv5R; ZQOHq: } public function create_group($group_name = FALSE, $group_description = '', $additional_data = array()) { goto qPXMX; U7sba: $this->set_error("\147\x72\x6f\165\x70\137\x6e\x61\x6d\x65\137\x72\145\161\165\151\x72\145\x64"); goto i1zQl; LM9gn: VPCKn: goto fx98d; xSBBy: v5i5T: goto F_m5r; F5Fvd: $group_id = $this->db->insert_id($this->tables["\x67\x72\x6f\x75\160\163"] . "\137\x69\x64\137\x73\x65\161"); goto O3oFX; O3oFX: $this->set_message("\x67\x72\x6f\x75\160\137\143\162\145\141\x74\151\x6f\156\137\163\x75\x63\143\x65\x73\163\x66\165\x6c"); goto qm7hL; RRH7Q: if (empty($additional_data)) { goto wBK0E; } goto uHPKz; mCzUs: if (!($existing_group !== 0)) { goto v5i5T; } goto aYBzZ; qm7hL: return $group_id; goto NTWHA; Y8E9L: $this->db->insert($this->tables["\x67\x72\157\165\160\163"], $data); goto F5Fvd; OzsUi: wBK0E: goto l2EMZ; pLvex: return FALSE; goto xSBBy; aYBzZ: $this->set_error("\x67\x72\157\165\160\137\141\x6c\162\x65\141\144\x79\x5f\x65\x78\151\163\x74\163"); goto pLvex; qPXMX: if ($group_name) { goto VPCKn; } goto U7sba; i1zQl: return FALSE; goto LM9gn; F_m5r: $data = ["\156\141\155\x65" => $group_name, "\144\145\163\143\x72\151\x70\164\x69\x6f\x6e" => $group_description]; goto RRH7Q; fx98d: $existing_group = $this->db->get_where($this->tables["\147\162\x6f\165\x70\163"], ["\156\141\155\145" => $group_name])->num_rows(); goto mCzUs; l2EMZ: $this->trigger_events("\x65\170\x74\162\141\137\x67\x72\x6f\x75\x70\x5f\163\145\x74"); goto Y8E9L; uHPKz: $data = array_merge($this->_filter_data($this->tables["\x67\x72\157\165\160\163"], $additional_data), $data); goto OzsUi; NTWHA: } public function update_group($group_id = FALSE, $group_name = FALSE, $additional_data = array()) { goto CTNic; uwA4T: return TRUE; goto D952j; JbSjr: return FALSE; goto MPLOH; yMCGG: return FALSE; goto U4BB1; kKA6T: if (!($this->config->item("\x61\144\155\x69\156\x5f\x67\162\157\x75\160", "\151\157\x6e\137\141\x75\164\150") === $group->name && $group_name !== $group->name)) { goto x5sIP; } goto UzlNl; Cjwxw: l3BOI: goto TqVUf; AybCz: $this->db->update($this->tables["\147\x72\x6f\165\x70\x73"], $data, ["\x69\x64" => $group_id]); goto MHpLM; xRx0Q: $data = []; goto U3EUW; ow8LF: return FALSE; goto jx87Y; jx87Y: i0zZW: goto xRx0Q; TqVUf: $group = $this->db->get_where($this->tables["\147\x72\x6f\x75\x70\x73"], ["\151\x64" => $group_id])->row(); goto kKA6T; DwXlt: $data["\156\141\x6d\x65"] = $group_name; goto Cjwxw; MHpLM: $this->set_message("\x67\162\x6f\165\x70\137\165\160\144\141\164\145\137\163\165\143\x63\x65\x73\x73\x66\x75\x6c"); goto uwA4T; Vg3Qv: if (!(isset($existing_group->id) && $existing_group->id != $group_id)) { goto T6dkE; } goto A0lwZ; TXU9M: UVkeQ: goto AybCz; f9sn7: $data = array_merge($this->_filter_data($this->tables["\x67\162\x6f\165\160\x73"], $additional_data), $data); goto TXU9M; U4BB1: x5sIP: goto He0Z7; CTNic: if (!empty($group_id)) { goto i0zZW; } goto ow8LF; U3EUW: if (empty($group_name)) { goto l3BOI; } goto zvt1c; zvt1c: $existing_group = $this->db->get_where($this->tables["\x67\x72\x6f\165\x70\x73"], ["\156\141\155\145" => $group_name])->row(); goto Vg3Qv; A0lwZ: $this->set_error("\x67\x72\x6f\165\x70\x5f\141\154\x72\x65\141\144\x79\x5f\145\170\x69\x73\x74\x73"); goto JbSjr; MPLOH: T6dkE: goto DwXlt; UzlNl: $this->set_error("\x67\162\157\x75\160\137\156\x61\155\x65\137\141\x64\155\151\156\x5f\x6e\157\164\137\141\154\164\145\162"); goto yMCGG; He0Z7: if (empty($additional_data)) { goto UVkeQ; } goto f9sn7; D952j: } public function delete_group($group_id = FALSE) { goto p0Sou; qLBCu: $this->trigger_events(["\x70\157\163\x74\137\x64\x65\154\145\x74\x65\x5f\147\162\157\165\x70", "\160\157\163\164\137\144\145\x6c\x65\164\145\x5f\x67\x72\157\165\x70\x5f\x75\156\x73\165\143\x63\145\163\x73\x66\x75\154"]); goto Zt3Y5; dKNBt: $this->trigger_events(["\160\157\x73\164\137\144\145\154\x65\164\x65\137\x67\162\x6f\x75\160", "\160\157\163\164\x5f\144\145\154\145\164\x65\137\147\162\x6f\x75\x70\137\163\x75\x63\143\145\x73\163\x66\165\154"]); goto qLp76; AG7W4: $this->db->trans_rollback(); goto qLBCu; L6919: $this->db->delete($this->tables["\147\162\x6f\165\160\163"], ["\151\x64" => $group_id]); goto tIetC; abU72: $this->trigger_events("\x70\162\x65\x5f\x64\145\154\x65\x74\x65\137\147\162\157\x75\x70"); goto sz82y; WL_Rx: KXxl6: goto JFNcv; qLp76: $this->set_message("\147\x72\157\x75\160\137\x64\x65\x6c\145\x74\x65\x5f\x73\x75\143\143\x65\163\x73\x66\165\x6c"); goto h7H6C; Zt3Y5: $this->set_error("\147\x72\x6f\x75\160\137\x64\x65\x6c\x65\x74\x65\x5f\x75\156\163\x75\x63\x63\145\x73\x73\x66\x75\x6c"); goto LzI4T; Bsatl: return FALSE; goto WL_Rx; EwSQL: $this->db->trans_commit(); goto dKNBt; LzI4T: return FALSE; goto slGCL; slGCL: IDhV6: goto EwSQL; JFNcv: $group = $this->group($group_id)->row(); goto xCqJp; vSQI1: $this->db->delete($this->tables["\x75\163\145\x72\163\x5f\x67\x72\x6f\165\x70\x73"], [$this->join["\147\162\x6f\x75\160\163"] => $group_id]); goto L6919; NDdNC: return FALSE; goto sduvC; sduvC: nNH3O: goto abU72; iHE8t: $this->trigger_events(["\x70\157\163\x74\x5f\144\x65\x6c\145\164\x65\137\x67\162\157\165\160", "\160\157\x73\164\137\144\145\154\x65\164\145\x5f\147\x72\157\165\x70\x5f\x6e\157\164\x61\x6c\x6c\157\x77\x65\144"]); goto E3zRQ; tIetC: if (!($this->db->trans_status() === FALSE)) { goto IDhV6; } goto AG7W4; sz82y: $this->db->trans_begin(); goto vSQI1; xCqJp: if (!($group->name == $this->config->item("\x61\x64\x6d\x69\x6e\137\x67\x72\x6f\165\x70", "\151\x6f\156\137\141\x75\x74\x68"))) { goto nNH3O; } goto iHE8t; E3zRQ: $this->set_error("\147\162\x6f\x75\160\x5f\x64\x65\154\145\164\x65\x5f\x6e\x6f\x74\x61\154\x6c\157\167\145\x64"); goto NDdNC; h7H6C: return TRUE; goto OLGJo; p0Sou: if (!(!$group_id || empty($group_id))) { goto KXxl6; } goto Bsatl; OLGJo: } public function set_hook($event, $name, $class, $method, $arguments) { goto URtUa; URtUa: $this->_ion_hooks->{$event}[$name] = new stdClass(); goto DPnlh; aTKhK: $this->_ion_hooks->{$event}[$name]->arguments = $arguments; goto hrsnq; DPnlh: $this->_ion_hooks->{$event}[$name]->class = $class; goto a2nOo; a2nOo: $this->_ion_hooks->{$event}[$name]->method = $method; goto aTKhK; hrsnq: } public function remove_hook($event, $name) { goto KqCAg; MX_lD: unset($this->_ion_hooks->{$event}[$name]); goto X49NT; X49NT: f7BfG: goto ncQjc; KqCAg: if (!isset($this->_ion_hooks->{$event}[$name])) { goto f7BfG; } goto MX_lD; ncQjc: } public function remove_hooks($event) { goto wtTvU; pXQzA: unset($this->_ion_hooks->{$event}); goto tMYfx; tMYfx: frpkp: goto UQjKK; wtTvU: if (!isset($this->_ion_hooks->{$event})) { goto frpkp; } goto pXQzA; UQjKK: } protected function _call_hook($event, $name) { goto nTFoG; SX8Di: $hook = $this->_ion_hooks->{$event}[$name]; goto Vdsc3; dPvc1: return FALSE; goto wjH44; VZHBJ: BCSxg: goto dPvc1; Vdsc3: return call_user_func_array([$hook->class, $hook->method], $hook->arguments); goto VZHBJ; nTFoG: if (!(isset($this->_ion_hooks->{$event}[$name]) && method_exists($this->_ion_hooks->{$event}[$name]->class, $this->_ion_hooks->{$event}[$name]->method))) { goto BCSxg; } goto SX8Di; wjH44: } public function trigger_events($events) { goto eooIv; Ewyfh: iC6DV: goto vPzPu; vPzPu: d1n87: goto TR_8D; bPH_m: foreach ($events as $event) { $this->trigger_events($event); FriVD: } goto Ewyfh; P8Az_: GPS3W: goto EDSTa; yPzKF: ugva1: goto bPH_m; XPAcy: foreach ($this->_ion_hooks->{$events} as $name => $hook) { $this->_call_hook($events, $name); vckTj: } goto P8Az_; EDSTa: MjOJ_: goto t2Wqc; qC2Jn: if (!(isset($this->_ion_hooks->{$events}) && !empty($this->_ion_hooks->{$events}))) { goto MjOJ_; } goto XPAcy; t2Wqc: goto d1n87; goto yPzKF; eooIv: if (is_array($events) && !empty($events)) { goto ugva1; } goto qC2Jn; TR_8D: } public function set_message_delimiters($start_delimiter, $end_delimiter) { goto FhrwU; Io7ce: return TRUE; goto I9Wfr; ABV0c: $this->message_end_delimiter = $end_delimiter; goto Io7ce; FhrwU: $this->message_start_delimiter = $start_delimiter; goto ABV0c; I9Wfr: } public function set_error_delimiters($start_delimiter, $end_delimiter) { goto pVt38; Z54Io: $this->error_end_delimiter = $end_delimiter; goto U9H14; U9H14: return TRUE; goto VTvBV; pVt38: $this->error_start_delimiter = $start_delimiter; goto Z54Io; VTvBV: } public function set_message($message) { $this->messages[] = $message; return $message; } public function messages() { goto CKzo5; oUWdv: foreach ($this->messages as $message) { goto APE9T; Zooz1: $_output .= $this->message_start_delimiter . $messageLang . $this->message_end_delimiter; goto MkFun; APE9T: $messageLang = $this->lang->line($message) ? $this->lang->line($message) : "\x23\43" . $message . "\43\43"; goto Zooz1; MkFun: nTuDI: goto atjRZ; atjRZ: } goto APDdI; VVgln: return $_output; goto VHdfR; CKzo5: $_output = ''; goto oUWdv; APDdI: FBqmM: goto VVgln; VHdfR: } public function messages_array($langify = TRUE) { goto aiJ49; PfTOj: return $_output; goto fNfh4; aiJ49: if ($langify) { goto ei21U; } goto oG3e6; DC_nA: jpQ8b: goto PfTOj; MO6Ir: goto zU32a; goto OvmTh; OvmTh: ei21U: goto alwrz; oG3e6: return $this->messages; goto MO6Ir; z7RPB: foreach ($this->messages as $message) { goto X07u0; lBx_Z: PL90T: goto DQvyD; X07u0: $messageLang = $this->lang->line($message) ? $this->lang->line($message) : "\43\x23" . $message . "\x23\43"; goto cSaef; cSaef: $_output[] = $this->message_start_delimiter . $messageLang . $this->message_end_delimiter; goto lBx_Z; DQvyD: } goto DC_nA; fNfh4: zU32a: goto N5dFr; alwrz: $_output = []; goto z7RPB; N5dFr: } public function clear_messages() { $this->messages = []; return TRUE; } public function set_error($error) { $this->errors[] = $error; return $error; } public function errors() { goto lJ67f; ph1Zt: return $_output; goto ZSxOV; kJpET: hbJVu: goto ph1Zt; lJ67f: $_output = ''; goto zSFmh; zSFmh: foreach ($this->errors as $error) { goto TN6co; TN6co: $errorLang = $this->lang->line($error) ? $this->lang->line($error) : "\x23\43" . $error . "\x23\x23"; goto WuWUw; ducIX: Cxdjc: goto EFdeQ; WuWUw: $_output .= $this->error_start_delimiter . $errorLang . $this->error_end_delimiter; goto ducIX; EFdeQ: } goto kJpET; ZSxOV: } public function errors_array($langify = TRUE) { goto UbHUQ; UbHUQ: if ($langify) { goto j4vIe; } goto f___d; jSn2T: $_output = []; goto BsE7b; lEzq3: return $_output; goto g2wMS; Yfvxx: g3xTc: goto lEzq3; f___d: return $this->errors; goto dgrOX; g2wMS: NwO7a: goto a_ddU; dgrOX: goto NwO7a; goto pri0A; BsE7b: foreach ($this->errors as $error) { goto SJ0I_; SJ0I_: $errorLang = $this->lang->line($error) ? $this->lang->line($error) : "\x23\x23" . $error . "\43\x23"; goto YTHmA; YTHmA: $_output[] = $this->error_start_delimiter . $errorLang . $this->error_end_delimiter; goto mFJmG; mFJmG: dc9Xz: goto pDHsV; pDHsV: } goto Yfvxx; pri0A: j4vIe: goto jSn2T; a_ddU: } public function clear_errors() { $this->errors = []; return TRUE; } protected function _set_password_db($identity, $password) { goto SiClb; AFJJq: return $this->db->affected_rows() == 1; goto gq7bm; UWcWC: $this->trigger_events("\145\x78\x74\x72\x61\x5f\167\x68\x65\x72\145"); goto kre_X; ujYv1: $data = ["\160\141\163\x73\x77\x6f\x72\144" => $hash, "\x72\x65\155\x65\155\x62\145\162\x5f\143\157\144\x65" => NULL, "\146\157\x72\x67\x6f\164\164\x65\x6e\x5f\160\141\163\163\167\157\x72\144\137\x63\157\x64\x65" => NULL, "\146\157\x72\147\157\x74\x74\145\x6e\137\x70\x61\x73\x73\x77\157\162\x64\x5f\x74\x69\x6d\x65" => NULL]; goto UWcWC; NaZbT: if (!($hash === FALSE)) { goto NDIhF; } goto kMSsx; kMSsx: return FALSE; goto ZJB66; kre_X: $this->db->update($this->tables["\x75\163\x65\162\163"], $data, [$this->identity_column => $identity]); goto AFJJq; ZJB66: NDIhF: goto ujYv1; SiClb: $hash = $this->hash_password($password, $identity); goto NaZbT; gq7bm: } protected function _filter_data($table, $data) { goto NgRGn; V9Ddo: Kg9a3: goto ef8WE; PKL2K: $columns = $this->db->list_fields($table); goto xFMWh; NgRGn: $filtered_data = []; goto PKL2K; xFMWh: if (!is_array($data)) { goto Kg9a3; } goto QOcjG; wPjAl: J1AIP: goto V9Ddo; ef8WE: return $filtered_data; goto slqiI; QOcjG: foreach ($columns as $column) { goto pzMX4; eQB2k: $filtered_data[$column] = $data[$column]; goto Phqxc; BI0DE: TcvRX: goto joHM9; pzMX4: if (!array_key_exists($column, $data)) { goto twmrH; } goto eQB2k; Phqxc: twmrH: goto BI0DE; joHM9: } goto wPjAl; slqiI: } protected function _random_token($result_length = 32) { goto K_QRM; qiXDr: return FALSE; goto tDF0L; C13zM: VQtWD: goto ADLvI; K_QRM: if (!(!isset($result_length) || intval($result_length) <= 8)) { goto VQtWD; } goto yNNWr; yNNWr: $result_length = 32; goto C13zM; BTggL: return bin2hex(mcrypt_create_iv($result_length / 2, MCRYPT_DEV_URANDOM)); goto pp2tM; irKyt: YMji8: goto nzlVM; Fifna: FczON: goto qiXDr; pp2tM: g006y: goto oZ2Ll; gg3MW: return bin2hex(openssl_random_pseudo_bytes($result_length / 2)); goto Fifna; ADLvI: if (!function_exists("\x72\x61\156\x64\x6f\155\x5f\x62\x79\x74\x65\x73")) { goto YMji8; } goto xxNOR; xxNOR: return bin2hex(random_bytes($result_length / 2)); goto irKyt; nzlVM: if (!function_exists("\155\143\x72\171\x70\x74\x5f\x63\x72\x65\141\x74\145\x5f\x69\x76")) { goto g006y; } goto BTggL; oZ2Ll: if (!function_exists("\157\160\145\156\x73\x73\x6c\x5f\x72\x61\x6e\144\x6f\155\137\160\x73\x65\x75\x64\x6f\137\142\x79\x74\x65\x73")) { goto FczON; } goto gg3MW; tDF0L: } protected function _get_hash_parameters($identity = NULL) { goto wcA5u; cxabp: dTjUF: goto bFLpq; EW_W5: return $params; goto mWD5l; s2pnl: Px7U_: goto GOER5; GOER5: $params = FALSE; goto hR11F; hR11F: switch ($this->hash_method) { case "\142\143\162\x79\x70\164": $params = ["\143\157\x73\x74" => $is_admin ? $this->config->item("\x62\x63\162\171\x70\164\x5f\x61\x64\x6d\151\156\137\x63\157\163\x74", "\151\x6f\156\x5f\141\165\x74\x68") : $this->config->item("\142\x63\x72\x79\160\x74\x5f\x64\x65\146\x61\x75\154\164\x5f\x63\157\x73\x74", "\151\x6f\156\x5f\141\x75\164\x68")]; goto fVZ8d; case "\x61\x72\147\x6f\156\x32": $params = $is_admin ? $this->config->item("\141\x72\147\x6f\x6e\x32\137\x61\144\x6d\x69\x6e\137\160\141\162\x61\x6d\163", "\151\x6f\156\137\x61\x75\164\x68") : $this->config->item("\141\162\x67\x6f\156\x32\137\x64\x65\x66\x61\165\154\164\137\160\141\162\x61\x6d\x73", "\x69\x6f\156\137\141\165\164\x68"); goto fVZ8d; default: } goto cxabp; Ho7Om: $is_admin = TRUE; goto qp1H_; wcA5u: $is_admin = FALSE; goto L7998; SJWxd: $user_id = $this->get_user_id_from_identity($identity); goto UCNvl; L7998: if (!$identity) { goto Px7U_; } goto SJWxd; UCNvl: if (!($user_id && $this->in_group($this->config->item("\x61\x64\x6d\x69\x6e\x5f\x67\162\x6f\x75\160", "\x69\157\x6e\137\141\x75\x74\150"), $user_id))) { goto HQhlr; } goto Ho7Om; bFLpq: fVZ8d: goto EW_W5; qp1H_: HQhlr: goto s2pnl; mWD5l: } protected function _get_hash_algo() { goto fy2b0; lmhQh: return $algo; goto mjIHR; d5GBg: G542u: goto lmhQh; QR4BG: w0bX4: goto d5GBg; fy2b0: $algo = FALSE; goto TSN91; TSN91: switch ($this->hash_method) { case "\142\x63\162\171\x70\x74": $algo = PASSWORD_BCRYPT; goto G542u; case "\141\162\147\157\x6e\62": $algo = PASSWORD_ARGON2I; goto G542u; default: } goto QR4BG; mjIHR: } protected function _generate_selector_validator_couple($selector_size = 40, $validator_size = 128) { goto QB1Mi; WVhXm: $validator = $this->_random_token($validator_size); goto kqLJj; kqLJj: $validator_hashed = $this->hash_password($validator); goto XbJuV; XbJuV: $user_code = "{$selector}\x2e{$validator}"; goto Sk217; QB1Mi: $selector = $this->_random_token($selector_size); goto WVhXm; Sk217: return (object) ["\x73\x65\154\x65\143\164\x6f\162" => $selector, "\x76\141\154\151\x64\141\164\157\162\137\x68\141\163\x68\145\x64" => $validator_hashed, "\165\163\x65\x72\x5f\x63\157\144\145" => $user_code]; goto du1UY; du1UY: } protected function _retrieve_selector_validator_couple($user_code) { goto Q610i; gXUz9: if (!(count($tokens) === 2)) { goto ts3rX; } goto lKlEI; DsxDC: ts3rX: goto ZdFJf; H1ydj: return FALSE; goto b1I8V; ZdFJf: IV1vI: goto H1ydj; Q610i: if (!$user_code) { goto IV1vI; } goto RQSfx; RQSfx: $tokens = explode("\56", $user_code); goto gXUz9; lKlEI: return (object) ["\x73\145\x6c\145\143\164\x6f\x72" => $tokens[0], "\166\141\154\151\144\x61\x74\x6f\x72" => $tokens[1]]; goto DsxDC; b1I8V: } protected function _password_verify_sha1_legacy($identity, $password, $hashed_password_db) { goto ZderJ; WSg4F: return FALSE; goto afMo2; XN4lS: return $result; goto Tdj04; lz2_w: $result = $this->_set_password_db($identity, $password); goto foxlV; H1BPC: FYyGE: goto X9_c_; xHOhw: if (!($query->num_rows() !== 1)) { goto q4c0u; } goto lFeDq; yveJa: $query = $this->db->select("\x73\x61\154\x74")->where($this->identity_column, $identity)->limit(1)->get($this->tables["\165\163\145\162\x73"]); goto yrr83; D9kma: Ir2cl: goto dsseR; FpeqR: $this->trigger_events(["\x70\157\x73\164\137\x73\150\x61\x31\x5f\x70\141\163\x73\x77\157\162\144\137\x6d\x69\147\x72\141\164\151\157\156", "\160\157\163\x74\x5f\x73\150\141\61\x5f\x70\141\163\163\167\157\x72\144\x5f\x6d\151\147\162\141\164\151\x6f\x6e\x5f\165\156\x73\x75\143\x63\145\x73\163\146\165\x6c"]); goto RjPKo; dsseR: $salt = substr($hashed_password_db, 0, $salt_length); goto zmozz; ZderJ: $this->trigger_events("\160\162\145\137\x73\150\141\x31\137\x70\141\163\163\167\x6f\162\x64\x5f\155\151\x67\162\x61\x74\151\x6f\x6e"); goto psTqN; psTqN: if ($this->config->item("\x73\x74\x6f\x72\x65\137\x73\141\154\x74", "\x69\157\156\x5f\141\x75\x74\150")) { goto xzzLL; } goto PNVls; dPbu1: xzzLL: goto yveJa; afMo2: q4c0u: goto FpGsJ; X9_c_: $this->trigger_events(["\160\x6f\x73\x74\x5f\163\x68\x61\61\137\160\x61\163\163\x77\x6f\x72\144\x5f\x6d\151\147\x72\141\x74\151\157\156", "\160\157\x73\164\x5f\163\150\x61\x31\x5f\x70\141\x73\163\x77\157\x72\x64\137\x6d\x69\x67\x72\x61\x74\151\157\156\x5f\163\165\x63\143\145\163\x73\146\165\x6c"]); goto Fd3YK; lFeDq: $this->trigger_events(["\x70\157\x73\x74\137\x73\150\x61\61\137\x70\141\163\163\167\x6f\x72\144\x5f\155\151\x67\162\141\164\x69\157\x6e", "\x70\x6f\163\164\x5f\163\150\141\61\137\x70\x61\x73\163\x77\x6f\x72\x64\x5f\155\151\147\162\141\x74\151\157\156\137\x75\x6e\163\165\x63\x63\145\x73\163\x66\165\154"]); goto WSg4F; gXbre: return FALSE; goto Y1OCv; f_Q54: goto ipGJZ; goto H1BPC; RjPKo: return FALSE; goto D9kma; UPaek: if ($salt_length) { goto Ir2cl; } goto FpeqR; AMsmZ: teP7t: goto WxUg9; FpGsJ: $hashed_password = sha1($password . $salt_db->salt); goto AMsmZ; ZF0EP: $this->trigger_events(["\160\x6f\x73\x74\137\x73\x68\x61\61\x5f\x70\141\163\x73\167\x6f\x72\144\137\x6d\x69\x67\162\x61\164\151\157\x6e", "\x70\x6f\x73\x74\x5f\163\150\141\x31\x5f\160\x61\x73\x73\x77\x6f\162\x64\137\x6d\151\147\162\x61\164\151\157\156\x5f\x75\156\163\165\x63\x63\x65\x73\163\146\165\154"]); goto gXbre; foxlV: if ($result) { goto FYyGE; } goto v3079; Y1OCv: goto dPVhX; goto iu7XX; zmozz: $hashed_password = $salt . substr(sha1($salt . $password), 0, -$salt_length); goto R2K8Y; Tdj04: dPVhX: goto OMTXb; iu7XX: a7OcH: goto lz2_w; yrr83: $salt_db = $query->row(); goto xHOhw; WxUg9: if ($hashed_password === $hashed_password_db) { goto a7OcH; } goto ZF0EP; Fd3YK: ipGJZ: goto XN4lS; PNVls: $salt_length = $this->config->item("\163\141\154\164\x5f\x6c\145\x6e\x67\164\x68", "\x69\157\156\x5f\x61\x75\164\x68"); goto UPaek; R2K8Y: goto teP7t; goto dPbu1; v3079: $this->trigger_events(["\160\x6f\x73\164\x5f\163\x68\141\61\137\160\141\163\x73\x77\157\x72\x64\x5f\155\x69\x67\162\141\164\151\157\156", "\x70\157\163\164\137\163\x68\x61\61\137\160\x61\163\x73\x77\157\x72\144\x5f\x6d\151\x67\162\141\164\x69\x6f\156\x5f\165\156\x73\165\143\143\145\x73\163\x66\165\x6c"]); goto f_Q54; OMTXb: } }

Function Calls

None

Variables

None

Stats

MD5 67a2b1a08c34ae7dc0cd8f0bd6af366b
Eval Count 0
Decode Time 102 ms