修改用户合并
This commit is contained in:
parent
fdb7c4177a
commit
6f6d1d7eae
@ -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('用户不存在');
|
||||||
|
|
||||||
|
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user