修改用户合并

This commit is contained in:
luofei 2024-03-13 10:38:42 +08:00 committed by mkm
parent fdb7c4177a
commit 6f6d1d7eae
2 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,8 @@ class UserTokenMiddleware extends BaseMiddleware
throw new AuthException('用户不存在'); throw new AuthException('用户不存在');
if (!$user['status']) if (!$user['status'])
throw new AuthException('用户已被禁用'); throw new AuthException('用户已被禁用');
if ($user['status'] == -1)
throw new AuthException('用户已被禁用');
if ($user['cancel_time']) if ($user['cancel_time'])
throw new AuthException('用户不存在'); throw new AuthException('用户不存在');

View File

@ -1769,6 +1769,7 @@ class Auth extends BaseController
} }
$user->wechat_user_id = 0; $user->wechat_user_id = 0;
$user->account = 'uid_' . $targetUser['uid']; $user->account = 'uid_' . $targetUser['uid'];
$user->status = -1;
$user->save(); $user->save();
Db::commit(); Db::commit();
} catch (\Throwable $e) { } catch (\Throwable $e) {