From bfdc6ea1deab807653fa8254b35dd0049b16a1ed Mon Sep 17 00:00:00 2001 From: REJack Date: Wed, 18 May 2016 21:15:15 +0200 Subject: [PATCH] removed System Variables if anyone use the System Variables and want update to v2.5.0 a Compatibility Library is available under https://github.com/REJack/CodeIgniter-Aauth-Compat --- application/libraries/Aauth.php | 92 --------------------------------- 1 file changed, 92 deletions(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 625ecbc..ea4ec3d 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -2306,98 +2306,6 @@ class Aauth { } } - ######################## - # Aauth System Variables - ######################## - - //tested - /** - * Set Aauth System Variable as key value - * if variable not set before, it will be set - * if set, overwrites the value - * @param string $key - * @param string $value - * @return bool - */ - public function set_system_var( $key, $value ) { - - // if var not set, set - if ($this->get_system_var($key) === FALSE) { - - $data = array( - 'data_key' => $key, - 'value' => $value, - ); - - return $this->aauth_db->insert( $this->config_vars['system_variables'] , $data); - - } - // if var already set, overwrite - else { - - $data = array( - 'data_key' => $key, - 'value' => $value, - ); - - $this->aauth_db->where( 'data_key', $key ); - return $this->aauth_db->update( $this->config_vars['system_variables'], $data); - } - - } - - //tested - /** - * Unset Aauth System Variable as key value - * @param string $key - * @return bool - */ - public function unset_system_var( $key ) { - - $this->aauth_db->where('data_key', $key); - - return $this->aauth_db->delete( $this->config_vars['system_variables'] ); - } - - //tested - /** - * Get Aauth System Variable by key - * Return string of variable value or FALSE - * @param string $key - * @return bool|string , FALSE if var is not set, the value of var if set - */ - public function get_system_var( $key ){ - - $query = $this->aauth_db->where('data_key', $key); - - $query = $this->aauth_db->get( $this->config_vars['system_variables'] ); - - // if variable not set - if ($query->num_rows() < 1) { return FALSE;} - - else { - - $row = $query->row(); - return $row->value; - } - } - - /** - * List System Variable Keys - * Return array of variable keys or FALSE - * @return bool|array , FALSE if var is not set, the value of var if set - */ - - public function list_system_var_keys(){ - $query = $this->aauth_db->select('data_key'); - $query = $this->aauth_db->get( $this->config_vars['system_variables'] ); - // if variable not set - if ($query->num_rows() < 1) { return FALSE;} - else { - return $query->result(); - } - } - public function generate_recaptcha_field(){ $content = ''; if($this->config_vars['ddos_protection'] && $this->config_vars['recaptcha_active']){