(BTW, as of 1.8 you will be able to get the select object from this
Then, if there is an unsuccessful login, check the code for the
authentication attempt getCode(). If the code is
Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID, I would then use the
credential as the key for the row to update.. and update the
failed_auth_attempts = its value + 1.
On a successful login, be sure to set the failed_auth_attempts back to 0.
Hope this helps.
> I want to know how to block an account after logining in for more than 3
> times using the zend framework.
> thanks in advance
Could you please send me the increment code, it increments in the first time and then stops i guess there is something wrong. This is my Code
$this->view->message = 'Login failed you probably enterd your user name or password Incorrectly';
$db = Zend_Registry::get('db');
$data = array( 'failed_logins' => $i);
$n = $db->update('account478', $data, "username='$uname'");
$this->view->form = $form;
If you want to prevent login after 3 unsuccessful attempts, you can add a
"failed_login_attempts" field to your users table, and increment the value
each time the authentication fails.
On Wed, Apr 15, 2009 at 2:07 PM, Ralph Schindler
> Attempting to log in with bad credentials 3 times?
> Or simply only allowing them to log in 3 times per account?
> Doood wrote:
>> hi, I want to know how to block an account after logining in for more than
>> times using the zend framework.
>> thanks in advance