zhaojs
2023-07-07 feb23da8c1660517aba5f90345607decfa7b1f5c
no message
已修改2个文件
7 ■■■■■ 文件已修改
application/api/controller/User.php 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
application/common/library/Auth.php 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
application/api/controller/User.php
@@ -327,7 +327,7 @@
        }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) {
application/common/library/Auth.php
@@ -134,7 +134,7 @@
     * @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)){
@@ -184,7 +184,8 @@
            '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);