修改h5接口判断用户是否存在

This commit is contained in:
lcc
2025-10-12 14:47:51 +08:00
parent 36fed7a26d
commit 1b679e2171
+5
View File
@@ -52,6 +52,11 @@ class ApiAuthHook
if (!$this->CI->userId) {
$this->return_json('登录已过期,请重新登录', 403);
}
$this->CI->load->model('agent/auto_user_model');
$user = $this->CI->auto_user_model->get(['id' => $this->CI->userId]);
if (!$user) {
$this->return_json('登录已过期,请重新登录', 403);
}
} else {
$this->return_json('请先登录', 403);
}