Browse Source

fixed loginAttemptModel::save

v3-dev
REJack 6 years ago
parent
commit
a7e072d49b
No known key found for this signature in database
GPG Key ID: 4A44B48700429F46
  1. 2
      application/Models/Aauth/LoginAttemptModel.php
  2. 1
      tests/Aauth/Libraries/Aauth/LoginTest.php

2
application/Models/Aauth/LoginAttemptModel.php

@ -150,7 +150,7 @@ class LoginAttemptModel
$builder->update($data, ['id' => $row->id]);
if ($data['count'] > $this->config->loginAttemptLimit)
if ($data['count'] >= $this->config->loginAttemptLimit)
{
return false;
}

1
tests/Aauth/Libraries/Aauth/LoginTest.php

@ -165,7 +165,6 @@ class LoginTest extends CIDatabaseTestCase
$this->library->login('admina@example.com', 'password123456');
$this->library->login('admina@example.com', 'password123456');
$this->library->login('admina@example.com', 'password123456');
$this->library->login('admina@example.com', 'password123456');
$this->assertFalse($this->library->login('admina@example.com', 'password123456'));
$this->assertEquals(lang('Aauth.loginAttemptsExceeded'), $this->library->getErrorsArray()[0]);
}

Loading…
Cancel
Save