nciaer 发表于 2024-12-11 17:54:24

修复qq互联手机端注册不成功问题

貌似qq互联2.0版本有这个问题,其它的不知道
参考2.0跟更新版本,只需要在connect.class.php末尾新增:
class mobileplugin_qqconnect_member extends mobileplugin_qqconnect {

        function connect_member() {
                global $_G, $seccodecheck, $secqaacheck, $connect_guest;

                if($this->allow) {
                        if($_G['uid'] && $_G['member']['conisbind']) {
                                dheader('location: '.$_G['siteurl'].'index.php');
                        }
                        $connect_guest = array();
                        if($_G['connectguest'] && (submitcheck('regsubmit', 0, $seccodecheck, $secqaacheck) || submitcheck('loginsubmit', 1, $seccodestatus))) {
                                if(!$_GET['auth_hash']) {
                                        $_GET['auth_hash'] = $_G['cookie']['con_auth_hash'];
                                }
                                $conopenid = authcode($_GET['auth_hash']);
                                $connect_guest = C::t('#qqconnect#common_connect_guest')->fetch($conopenid);
                                if(!$connect_guest) {
                                        dsetcookie('con_auth_hash');
                                        showmessage('qqconnect:connect_login_first');
                                }
                        }
                }
        }
}


手机模板里可能也要改,但是没最终测试。
手机注册模板form结尾添加
<input type="hidden" id="auth_hash" name="auth_hash" value="{$_G['qc']['connect_auth_hash']}" />
<input type="hidden" id="is_notify" name="is_notify" value="{$_G['qc']['connect_is_notify']}" />
<input type="hidden" id="is_feed" name="is_feed" value="{$_G['qc']['connect_is_feed']}" />


如果form的action不是member.php?mod=$regname,那也要改成这个,因为$regname=connect才是走的qq互联,默认是register
页: [1]
查看完整版本: 修复qq互联手机端注册不成功问题