Welcome Guest, Not a member yet? Register   Sign In
Tank Auth Library
#1

[eluser]xtremer360[/eluser]
I'm using the tank auth library and want to modify it a little to my using.

Here's the following code that exists:

Code:
// Get login for counting attempts to login
if ($this->config->item('login_count_attempts', 'tank_auth') AND
($username = $this->input->post('username'))) {
    $username = $this->security->xss_clean($username);
} else {
    $username = '';
}

I am actually storing the login attempts in my database and am curious as to how I should modify this section of code.

I know I'm going to need to create a get_login_attempts however I'm wondering if this is how it should look or if there is a better way? 5 is the maximum amount of login attempts before the account gets locked.

Code:
// Get login for counting attempts to login
  if ($this->tank_auth->get_login_count_attempts($this->input->post('username')) == 5)
{
    $username = $this->security->xss_clean($username);
} else {
    $username = '';
}





Theme © iAndrew 2016 - Forum software by © MyBB