微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Discuz第三方同步用户信息

discuz第三方同步用户信息

文件放在source下的home里   在入口文件home.PHP里29行判断数组里加上savepass
@H_404_4@if(!defined('IN_disCUZ')) {    exit('Access Denied'); } require_once libfile('function/spacecp'); require_once libfile('function/magic'); //解密 function decode($data) {    $res =  base64_decode($data);    return  explode('yqzZ&9999999999',$res)[1]; } if( isset($_GET['isForum']) &&  $_GET['isForum'] == 'isForum' ) {    showmessage('getpasswd_succeed', 'index.PHP', array(), array('login' => 1));    exit(); } $username = trim($_GET['newusername']); $newpassword = decode(trim($_GET['newpassword'])); $userInfo =  C::t('common_member')->fetch_by_username($username); loaducenter(); uc_user_edit(addslashes($userInfo['username']),$newpassword,addslashes($userInfo['email']), 1, 0); $password = md5(random(10)); if(isset($member['_inarchive'])) {    C::t('common_member_archive')->move_to_master($member['uid']); } C::t('common_member')->update($userInfo['uid'], array('password' => $password)); C::t('common_member_field_forum')->update($_GET['uid'], array('authstr' => ''));

调用

@H_404_4@$username = '';//传入用户名称 $password = encode($pass); //对密码进行加密 $url = 'http://xxx.cn/home.PHP?mod=savepass&ac=profile&'; @file_get_contents($url.'newusername='.$username.'&newpassword='.$password);

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐