增加账号被禁用拦截

This commit is contained in:
lingling 2025-02-20 13:38:18 +08:00
parent 41c7a26577
commit 67657a4af9
1 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,10 @@ class UserController
// 根据手机号查询用户
$user = User::where('username', '=', $username)->first();
if($user->status==0){
return ApiResponseApp::error('账号被禁用');
}
// // 如果未找到用户,返回错误
if (!$user) {
return ApiResponseApp::error('账号或密码错误');