mirror of https://gitee.com/karson/fastadmin.git
优化前台会员登录
parent
c5285b8fdd
commit
e7c1922cf3
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue