php168 v6分類信息整合ucenter同步登錄,同步退出解決方案

字號(hào):


    PHP168 V6fenlei(分類系統(tǒng))整合UCenter步驟
    1注冊(cè)頁面,修改do\reg.php
    代碼如下:
    <?php
    require(dirname(__FILE__).”/”.”global.php”);
    $_GET['_fromurl'] && $_fromurl=$_GET['_fromurl'];
    unset($uc_login_code);//添加uc返回值變量
    if(strstr($jumpto,$webdb[www_url])){
    refreshto(“$jumpto”,”恭喜你,注冊(cè)成功$uc_login_code“,1);//輸出同步登錄UC代碼
    }else{
    refreshto(“$webdb[www_url]“,”恭喜你,注冊(cè)成功$uc_login_code“,1);//輸出同步登錄UC代碼
    2.修改inc\class.user.php
    中方法//注冊(cè)用戶通行證郵箱密碼必須信息
    function register_passport($array) {
    ………elseif(defined(“UC_CONNECT”)){
    $uid=uc_user_register($array[username], $array[password], $array[email]);
    // 添加同步登錄代碼
    if($uid&&eregi(“^dzbbs7″,$webdb[passport_type])){
    3修改upload\do\api\uc.php
    修改方法function synlogin($get, $post) {
    {
    If{
    }
    Else{
    具體代碼看源代碼
    }
    }