release
parent
4829fa8744
commit
b1ba1d373a
|
|
@ -112,12 +112,13 @@ class MiniprogramController extends Controller
|
|||
$old_user = User::where('phone', $phone)->where('status', User::STATUS_ACTIVE)->where('id', '!=', $user->id)->first();
|
||||
if ($old_user) {
|
||||
// 禁用新用户
|
||||
$user->update([
|
||||
'phone' => '',
|
||||
'status' => User::STATUS_DISABLED,
|
||||
'status_remark' => '手机号重复: ' . $phone
|
||||
]);
|
||||
$user = $old_user;
|
||||
throw new BizException('手机号已经注册');
|
||||
// $user->update([
|
||||
// 'phone' => '',
|
||||
// 'status' => User::STATUS_DISABLED,
|
||||
// 'status_remark' => '手机号重复: ' . $phone
|
||||
// ]);
|
||||
// $user = $old_user;
|
||||
} else {
|
||||
$user->update([
|
||||
'phone' => $phone,
|
||||
|
|
|
|||
Loading…
Reference in New Issue