admin 发表于 2022-7-5 01:36:37

DZ X3.4中QQ互联注册时强制输入密码方法

QQ互联的注册环节没有密码设定
绝大部分通过QQ互联注册的用户是不会再去设定他的密码的
很大一部分绑定QQ账号的用户(设定了密码的),也可能已经忘记了它的密码
最关键的是作为站长的你,抛开QQ的情况下,无法来保证以后用户都能正常登录

但是这个功能不用,也是怪可惜了。所以只需要稍微改下代码,稍微减弱些用户体验,
你就能保证用户资料的独立性——在QQ互联注册环节强制要求用户设定密码。

操作方法:

1. 打开文件source/plugin/qqconnect/template/module.htm

(1) 查找
$('{$_G['setting']['reginput']['password']}').parentNode.parentNode.parentNode.parentNode.parentNode.style.display = 'none';
$('{$_G['setting']['reginput']['password']}').outerHTML += '$js1';
$('{$_G['setting']['reginput']['password']}').required = 0;
$('{$_G['setting']['reginput']['password2']}').parentNode.parentNode.parentNode.parentNode.parentNode.style.display = 'none';
$('{$_G['setting']['reginput']['password2']}').required = 0;

修改成
//$('{$_G['setting']['reginput']['password']}').parentNode.parentNode.parentNode.parentNode.parentNode.style.display = 'none';
$('{$_G['setting']['reginput']['username']}').outerHTML += '$js1';
$('{$_G['setting']['reginput']['password']}').required = 1;
//$('{$_G['setting']['reginput']['password2']}').parentNode.parentNode.parentNode.parentNode.parentNode.style.display = 'none';
$('{$_G['setting']['reginput']['password2']}').required = 1;


2 打开文件 source/module/member/member_connect.PHP

查找
$ctl_obj->setting['ignorepassword'] = 1;
将它注释掉,或者删除

3 打开文件 source/module/member/member_connect_register.php

查找
C::t('#qqconnect#common_member_connect')->insert(array(
'uid' => $uid,
'conuin' => $conuin,
'conuinsecret' => $conuinsecret,
'conuintoken' => $conuintoken,
'conopenid' => $conopenid,
'conispublishfeed' => $conispublishfeed,
'conispublisht' => $conispublisht,
'conisregister' => '1',
'conisqzoneavatar' => $is_qzone_avatar,
'conisfeed' => '1',
'conisqqshow' => $is_use_qqshow,
));

修改成

C::t('#qqconnect#common_member_connect')->insert(array(
'uid' => $uid,
'conuin' => $conuin,
'conuinsecret' => $conuinsecret,
'conuintoken' => $conuintoken,
'conopenid' => $conopenid,
'conispublishfeed' => $conispublishfeed,
'conispublisht' => $conispublisht,
'conisregister' => '0',
'conisqzoneavatar' => '0',
'conisfeed' => '1',
'conisqqshow' => '0',

完成修改,QQ用户注册时也需要设置密码!!!

QQ注册测试 发表于 2022-7-5 01:53:10

爱江苏,江苏人的社区论坛
页: [1]
查看完整版本: DZ X3.4中QQ互联注册时强制输入密码方法