|
@@ -221,7 +221,13 @@ class Auth
|
|
|
$this->setError('Account is locked');
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ if ($user->loginfailure >= 10 && time() - $user->loginfailuretime < 86400) {
|
|
|
+ $this->setError('Please try again after 1 day');
|
|
|
+ }
|
|
|
+
|
|
|
if ($user->password != $this->getEncryptPassword($password, $user->salt)) {
|
|
|
+ $user->save(['loginfailure' => $user->loginfailure + 1, 'loginfailuretime' => time()]);
|
|
|
$this->setError('Password is incorrect');
|
|
|
return false;
|
|
|
}
|