Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
321f52ea95
@ -441,20 +441,22 @@ class LoginLogic extends BaseLogic
|
|||||||
*/
|
*/
|
||||||
public static function updateUser($params, $userId)
|
public static function updateUser($params, $userId)
|
||||||
{
|
{
|
||||||
$find=User::where(['mobile' =>$params['mobile']])->find();
|
|
||||||
if($find){
|
|
||||||
$auth=UserAuth::where(['user_id'=>$find['id']])->find();//别人的
|
|
||||||
if($auth){
|
|
||||||
self::$error ='该手机号已绑定';
|
|
||||||
return false;
|
|
||||||
}else{
|
|
||||||
UserAuth::where(['user_id'=>$userId])->update(['user_id'=>$find['id']]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$data=['is_new_user' => YesNoEnum::NO];
|
$data=['is_new_user' => YesNoEnum::NO];
|
||||||
|
|
||||||
if(isset($params['mobile']) && $params['mobile']!=''){
|
if(isset($params['mobile']) && $params['mobile']!=''){
|
||||||
$data['mobile']=$params['mobile'];
|
$data['mobile']=$params['mobile'];
|
||||||
|
$find=User::where(['mobile' =>$params['mobile']])->find();
|
||||||
|
if($find){
|
||||||
|
$auth=UserAuth::where(['user_id'=>$find['id']])->find();//别人的
|
||||||
|
if($auth){
|
||||||
|
self::$error ='该手机号已绑定';
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
UserAuth::where(['user_id'=>$userId])->update(['user_id'=>$find['id']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($params['nickname'])){
|
if(!empty($params['nickname'])){
|
||||||
$data['nickname'] = $params['nickname'];
|
$data['nickname'] = $params['nickname'];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user