@@ 208-215 (lines=8) @@ | ||
205 | ||
206 | // Increase login attempt |
|
207 | ||
208 | public function _increase_login_attempt() { |
|
209 | if ($this->ci->config->item('DX_count_login_attempts') AND ! $this->is_max_login_attempts_exceeded()) { |
|
210 | // Load model |
|
211 | $this->ci->load->model('dx_auth/login_attempts', 'login_attempts'); |
|
212 | // Increase login attempts for current IP |
|
213 | $this->ci->login_attempts->increase_attempt($this->ci->input->ip_address()); |
|
214 | } |
|
215 | } |
|
216 | ||
217 | // Clear login attempts |
|
218 | ||
@@ 219-226 (lines=8) @@ | ||
216 | ||
217 | // Clear login attempts |
|
218 | ||
219 | public function _clear_login_attempts() { |
|
220 | if ($this->ci->config->item('DX_count_login_attempts')) { |
|
221 | // Load model |
|
222 | $this->ci->load->model('dx_auth/login_attempts', 'login_attempts'); |
|
223 | // Clear login attempts for current IP |
|
224 | $this->ci->login_attempts->clear_attempts($this->ci->input->ip_address()); |
|
225 | } |
|
226 | } |
|
227 | ||
228 | // Get role data from database by id, used in _set_session() function |
|
229 | // $parent_roles_id, $parent_roles_name is an array. |