收礼用户必须实名
This commit is contained in:
@@ -67,6 +67,19 @@ class GiveGift extends Model
|
||||
return ['code' => 301, 'msg' => '当前用户登录失效', 'data' => null];
|
||||
}
|
||||
|
||||
//循环查询用户是否实名
|
||||
foreach ($toarray as $key => $value){
|
||||
$mobile = Db::name('user')->where(['id'=>$value])->value('mobile');
|
||||
$is_real = db::name('user_auth')->where('mobile' , $mobile)->field('id,is_real')->find();
|
||||
if($is_real){
|
||||
if($is_real['is_real'] != 1){
|
||||
return ['code' => 0, 'msg' => '收礼用户中有未实名', 'data' => null];
|
||||
}
|
||||
}else{
|
||||
return ['code' => 0, 'msg' => '收礼用户中有未实名', 'data' => null];
|
||||
}
|
||||
}
|
||||
|
||||
//获取送礼用户昵称
|
||||
$FromUserInfo = db::name('user')->where('id',$uid)->field('id as user_id,nickname,avatar,sex')->find();
|
||||
$FromUserInfo['icon'][0] = model('UserData')->user_wealth_icon($uid);//财富图标
|
||||
|
||||
Reference in New Issue
Block a user