硬汉工作室

 找回密码
 立即注册

QQ登录

只需一步,快速开始

+
搜索
热搜: 活动 交友 discuz

[开发技术] 修复qq互联手机端注册不成功问题

[复制链接]
发表于 2024-12-11 17:54:24 | 显示全部楼层 |阅读模式
貌似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
有关PHP系统、Discuz或网站等各种问题,可以联系QQ1069971363寻求付费支持
Discuz插件商店:http://addon.dismall.com/?@56030.developer
回复

使用道具 举报

QQ|Archiver|手机版|小黑屋|硬汉工作室 ( 冀ICP备13021567号-9 )

GMT+8, 2025-2-5 19:46 , Processed in 0.058341 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表