• ucenter1.5與第三方程式整合(asp.net)過程中的經驗分享。


    在整合的過程中參照了這個帖子(或將此鏈接拷貝至瀏覽器地址欄打開:http://www.discuz.net/thread-1694755-1-1.html),在此,向分享經驗的同志表示感謝。

    整合了discuzx1和ucenter以及自己開發的第三方程式,在discuzx1中需要修改的地方:

    在uc_client\control中的user.php的function onedit() :

    將:$_ENV['note']->add(‘updatepw’, ‘username=’.urlencode($username).’&password=’);

    改為:$_ENV['note']->add(‘updatepw’, ‘username=’.urlencode($username).’&password=’.$newpw.’&email=’.$email);

    ============拷貝的分割線,下面是從上面給出的帖子地址中拷貝出來的============

    discuz修改密码后将修改密码和email的信息通过ucclient传递给ucenter,
    ucenter在收到消息后将消息存入cdb_uc_notelist表,
    而后从cdb_uc_notelist取出一条close为0的记录,逐一向各个应用发送修改密码的通知。
    各位朋友在调试时记得核对下表cdb_uc_notelist中是否有多条close为0的记录影响调试。

    uc_client\client.php文件中的

    function uc_user_edit($username, $oldpw, $newpw, $email, $ignoreoldpw = 0, $questionid = ”, $answer = ”) {
    return call_user_func(UC_API_FUNC, ‘user’, ‘edit’, array(‘username’=>$username, ‘oldpw’=>$oldpw, ‘newpw’=>$newpw, ‘email’=>$email, ‘ignoreoldpw’=>$ignoreoldpw, ‘questionid’=>$questionid, ‘answer’=>$answer));
    }

    改为

    function uc_user_edit($username, $oldpw, $newpw, $email, $ignoreoldpw = 0, $questionid = ”, $answer = ”) {
    return call_user_func(‘uc_api_post’, ‘user’, ‘edit’, array(‘username’=>$username, ‘oldpw’=>$oldpw, ‘newpw’=>$newpw, ‘email’=>$email, ‘ignoreoldpw’=>$ignoreoldpw, ‘questionid’=>$questionid, ‘answer’=>$answer));
    }

    uc_server\control\user.php文件中的 onedit()方法中的

    $_ENV['note']->add(‘updatepw’, ‘username=’.urlencode($username).’&password=’);

    改为(需要在第三方应用中处理旧密码和密码问答的请再加上$ignoreoldpw、$questionid、$answer等变量)

    $_ENV['note']->add(‘updatepw’, ‘username=’.urlencode($username).’&password=’.urlencode($newpw).’&email=’.urlencode($email));

    ////////////////////////////////
    ////////Sixi. Let it be.../////
    //////////////////////////////

  • 相关阅读:
    HTML(三)
    HTML(二)
    HTML(一)
    Python-数据库索引浅谈
    Django-ORM之聚合和分组查询、F和Q查询、事务
    [LeetCode][Python]String to Integer (atoi)
    [LeetCode][Python]Reverse Integer
    [LeetCode][Python]ZigZag Conversion
    [LeetCode][Python]Longest Palindromic Substring
    [LeetCode][Python]Median of Two Sorted Arrays
  • 原文地址:https://www.cnblogs.com/sixiweb/p/1872643.html
Copyright © 2020-2023  润新知