|
@@ 1121-1126 (lines=6) @@
|
| 1118 |
|
if ($this->config->item('track_login_attempts', 'ion_auth')) { |
| 1119 |
|
$this->db->select('1', FALSE); |
| 1120 |
|
$this->db->where('login', $identity); |
| 1121 |
|
if ($this->config->item('track_login_ip_address', 'ion_auth')) { |
| 1122 |
|
if (!isset($ip_address)) { |
| 1123 |
|
$ip_address = $this->_prepare_ip($this->input->ip_address()); |
| 1124 |
|
} |
| 1125 |
|
$this->db->where('ip_address', $ip_address); |
| 1126 |
|
} |
| 1127 |
|
$this->db->where('time >', time() - $this->config->item('lockout_time', 'ion_auth'), FALSE); |
| 1128 |
|
$qres = $this->db->get($this->tables['login_attempts']); |
| 1129 |
|
return $qres->num_rows(); |
|
@@ 1170-1175 (lines=6) @@
|
| 1167 |
|
if ($this->config->item('track_login_attempts', 'ion_auth')) { |
| 1168 |
|
$this->db->select('time'); |
| 1169 |
|
$this->db->where('login', $identity); |
| 1170 |
|
if ($this->config->item('track_login_ip_address', 'ion_auth')) { |
| 1171 |
|
if (!isset($ip_address)) { |
| 1172 |
|
$ip_address = $this->_prepare_ip($this->input->ip_address()); |
| 1173 |
|
} |
| 1174 |
|
$this->db->where('ip_address', $ip_address); |
| 1175 |
|
} |
| 1176 |
|
$this->db->order_by('id', 'desc'); |
| 1177 |
|
$qres = $this->db->get($this->tables['login_attempts'], 1); |
| 1178 |
|
|
|
@@ 1246-1251 (lines=6) @@
|
| 1243 |
|
$old_attempts_expire_period = max($old_attempts_expire_period, $this->config->item('lockout_time', 'ion_auth')); |
| 1244 |
|
|
| 1245 |
|
$this->db->where('login', $identity); |
| 1246 |
|
if ($this->config->item('track_login_ip_address', 'ion_auth')) { |
| 1247 |
|
if (!isset($ip_address)) { |
| 1248 |
|
$ip_address = $this->_prepare_ip($this->input->ip_address()); |
| 1249 |
|
} |
| 1250 |
|
$this->db->where('ip_address', $ip_address); |
| 1251 |
|
} |
| 1252 |
|
// Purge obsolete login attempts |
| 1253 |
|
$this->db->or_where('time <', time() - $old_attempts_expire_period, FALSE); |
| 1254 |
|
|