|
|
@ -221,16 +221,6 @@ class Aauth { |
|
|
|
|
|
|
|
|
|
|
|
$user_id = $query->row()->id; |
|
|
|
$user_id = $query->row()->id; |
|
|
|
|
|
|
|
|
|
|
|
$query = null; |
|
|
|
|
|
|
|
$query = $this->aauth_db->where($db_identifier, $identifier); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Database stores pasword hashed password |
|
|
|
|
|
|
|
$query = $this->aauth_db->where('pass', $this->hash_password($pass, $user_id)); |
|
|
|
|
|
|
|
$query = $this->aauth_db->where('banned', 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$query = $this->aauth_db->get($this->config_vars['users']); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$row = $query->row(); |
|
|
|
|
|
|
|
if( ($this->config_vars['use_cookies'] == TRUE && $this->CI->input->cookie('reCAPTCHA', TRUE) == 'true') || ($this->config_vars['use_cookies'] == FALSE && $this->CI->session->tempdata('reCAPTCHA') == 'true') ){ |
|
|
|
if( ($this->config_vars['use_cookies'] == TRUE && $this->CI->input->cookie('reCAPTCHA', TRUE) == 'true') || ($this->config_vars['use_cookies'] == FALSE && $this->CI->session->tempdata('reCAPTCHA') == 'true') ){ |
|
|
|
$reCaptcha = new ReCaptcha( $this->config_vars['recaptcha_secret']); |
|
|
|
$reCaptcha = new ReCaptcha( $this->config_vars['recaptcha_secret']); |
|
|
|
$resp = $reCaptcha->verifyResponse( $this->CI->input->server("REMOTE_ADDR"), $this->CI->input->post("g-recaptcha-response") ); |
|
|
|
$resp = $reCaptcha->verifyResponse( $this->CI->input->server("REMOTE_ADDR"), $this->CI->input->post("g-recaptcha-response") ); |
|
|
@ -287,8 +277,19 @@ class Aauth { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$query = null; |
|
|
|
|
|
|
|
$query = $this->aauth_db->where($db_identifier, $identifier); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Database stores pasword hashed password |
|
|
|
|
|
|
|
$query = $this->aauth_db->where('pass', $this->hash_password($pass, $user_id)); |
|
|
|
|
|
|
|
$query = $this->aauth_db->where('banned', 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$query = $this->aauth_db->get($this->config_vars['users']); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$row = $query->row(); |
|
|
|
|
|
|
|
|
|
|
|
// if email and pass matches and not banned |
|
|
|
// if email and pass matches and not banned |
|
|
|
if ( $query->num_rows() > 0 ) { |
|
|
|
if ( $query->num_rows() != 0 ) { |
|
|
|
|
|
|
|
|
|
|
|
// If email and pass matches |
|
|
|
// If email and pass matches |
|
|
|
// create session |
|
|
|
// create session |
|
|
|