封禁登录提示

This commit is contained in:
2025-09-23 19:03:05 +08:00
parent 8abfa49494
commit 01f63041a5

View File

@@ -265,10 +265,13 @@ class Login extends Model
return ['code' => 0, 'msg' => '密码不能为空', 'data' => null];
}
$user_info = model('User')->where(['mobile' => $user_name,'status'=>1])->find();
$user_info = model('User')->where(['mobile' => $user_name,'status'=>['<>',0]])->find();
if (empty($user_info)) {
return ['code' => 0, 'msg' => '用户不存在', 'data' => null];
}
if ($user_info['status'] != 1) {
return ['code' => 301, 'msg' => '用户被禁用,请联系管理员', 'data' => null];
}
if (md5($password) != $user_info['password']) {
return ['code' => 0, 'msg' => '密码错误', 'data' => null];