From 24eefa338500e0d1034bfd7502d796a034029d01 Mon Sep 17 00:00:00 2001 From: lqmac Date: Sat, 23 Mar 2024 15:21:02 +0800 Subject: [PATCH] 1 --- app/api/controller/User.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/api/controller/User.php b/app/api/controller/User.php index 2e7cae02..5d70a7f1 100644 --- a/app/api/controller/User.php +++ b/app/api/controller/User.php @@ -361,6 +361,9 @@ class User extends Controller $params = $this->request->param(); $user_id = $params['user_id'] ?? 0; unset($params['user_id']); + if (isset($params['status']) && $params['status']) { + $params['user_type'] = 0; + } UserModel::where('user_id', $user_id)->update($params); return $this->renderSuccess('ok'); }