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();
|
$old_user = User::where('phone', $phone)->where('status', User::STATUS_ACTIVE)->where('id', '!=', $user->id)->first();
|
||||||
if ($old_user) {
|
if ($old_user) {
|
||||||
// 禁用新用户
|
// 禁用新用户
|
||||||
$user->update([
|
throw new BizException('手机号已经注册');
|
||||||
'phone' => '',
|
// $user->update([
|
||||||
'status' => User::STATUS_DISABLED,
|
// 'phone' => '',
|
||||||
'status_remark' => '手机号重复: ' . $phone
|
// 'status' => User::STATUS_DISABLED,
|
||||||
]);
|
// 'status_remark' => '手机号重复: ' . $phone
|
||||||
$user = $old_user;
|
// ]);
|
||||||
|
// $user = $old_user;
|
||||||
} else {
|
} else {
|
||||||
$user->update([
|
$user->update([
|
||||||
'phone' => $phone,
|
'phone' => $phone,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue