修复修改密码的问题

This commit is contained in:
2025-03-03 16:16:03 +08:00
parent 8b5cd82f52
commit f1a140289a

View File

@@ -144,9 +144,9 @@ class LoginController extends BaseAdminController
$expireTime = 1800; // 30 分钟
$errNum = $redis->get($key);
$txt = '当前账号因频繁登录失败已被锁定30分钟内无法重试预计解锁时间';
if ($errNum >= $maxAttempts) {
throw new Exception($txt. date('Y-m-d H:i:s', time() + $redis->ttl($key)));
}
// if ($errNum >= $maxAttempts) {
// throw new Exception($txt. date('Y-m-d H:i:s', time() + $redis->ttl($key)));
// }
$model = new LoginForm();
try {
@@ -306,7 +306,8 @@ class LoginController extends BaseAdminController
$this->requestValidate($post, [
[['mobile', 'password'], 'required']
]);
$post['mobile'] = ase_decode($post['mobile']);
// $post['mobile'] = ase_decode($post['mobile']);
$post['password'] = ase_decode($post['password']);
$LoginForm = new LoginForm();
$LoginForm->attributes = $post;
return $LoginForm->ResetPassword();