| | |
| | | }else{ //判断微信是否已经绑定 |
| | | $find_third = $ModelThird->where(['openid'=>$wxUser['openid']])->find(); |
| | | if(!empty($find_third)) $this->error('当前微信号已绑定其他账号'); |
| | | $ret = $this->auth->register('', Random::alnum(), '', $mobile, [],'wechat',$wxUser); |
| | | $ret = $this->auth->register('', Random::alnum(), '', $mobile, [],'wechat',$wxUser,$pushCid); |
| | | } |
| | | Sms::flush($mobile, 'changemobile'); |
| | | if ($ret) { |
| | |
| | | * @param string $third_info 三方用户信息 注:需保持统一结构 |
| | | * @return boolean |
| | | */ |
| | | public function register($username = '', $password, $email = '', $mobile = '', $extend = [],$third_platform="",$third_info=[]) |
| | | public function register($username = '', $password, $email = '', $mobile = '', $extend = [],$third_platform="",$third_info=[],$pushCid="") |
| | | { |
| | | // 检测用户名、昵称、邮箱、手机号是否存在 |
| | | if(!empty($third_platform) && !empty($third_info)){ |
| | |
| | | 'logintime' => $time, |
| | | 'loginip' => $ip, |
| | | 'prevtime' => $time, |
| | | 'status' => 'normal' |
| | | 'status' => 'normal', |
| | | 'push_cid'=>$pushCid |
| | | ]); |
| | | //$params['password'] = $this->getEncryptPassword($password, $params['salt']); |
| | | $params = array_merge($params, $extend); |