修改手机号
This commit is contained in:
@@ -277,9 +277,14 @@ class UserData extends Model
|
||||
return ['code' => 0, 'msg' => '该手机号已达绑定上限','data' =>null];
|
||||
}
|
||||
//查询旧手机号
|
||||
$mobile = db::name('user')->where(['id' => $user_id])->value('username');
|
||||
//查询是否实名
|
||||
$is_real = db::name('user_auth')->where(['mobile' => $mobile,'is_real' => 1])->find();
|
||||
$mobile = db::name('user')->where(['id' => $user_id])->value('mobile');
|
||||
if($mobile){
|
||||
//查询是否实名
|
||||
$is_real = db::name('user_auth')->where(['mobile' => $mobile,'is_real' => 1])->find();
|
||||
}else{
|
||||
$is_real = false;
|
||||
}
|
||||
|
||||
if($is_real){
|
||||
//开启事务
|
||||
db::startTrans();
|
||||
|
||||
Reference in New Issue
Block a user