Welcome Guest, Not a member yet? Register   Sign In
The Auth Library 1.0.3 - The Easiest Auth Library for CodeIgniter
#20

[eluser]gyo[/eluser]
Let's say our counter variable is named attempts

With that in mind you can retrieve/set the value at each login attempt like:

Code:
$current_attempts = $this->session->userdata('attempts'); // retrieve old value
$this->session->set_userdata('attempts', $current_attempts++); // set new value

Of course you should check the number of attempts before setting the new value and even before trying to login the user.

I don't know if you already did it, but you can set the expiration time for the session in the config file, it's named sess_expiration

Anyway I just came back home and I'm downloading the lib cause I want to try it out!


Messages In This Thread
The Auth Library 1.0.3 - The Easiest Auth Library for CodeIgniter - by El Forum - 03-09-2009, 02:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB