lmn40227

已創建論壇回覆

正在查看 6 個帖子:11-16 (共 16 個帖子)
  • 作者
    帖子
  • lmn40227
    參與者
    • 文章數量: 23
    @lmn40227
    樓主

    第一個 test failed 跳出來了, 但是 後面的 還是不行.

    lmn40227
    參與者
    • 文章數量: 23
    @lmn40227
    樓主

    首頁改成任意自定義頁面除了 shop 的頁面, 然後選擇 template homepage.

    修改 template-homepage.php.

     

    即可

    lmn40227
    參與者
    • 文章數量: 23
    @lmn40227
    樓主

    嗯 ..   我聯繫過 其中幾個.. 當我問他們 怎麼用户解決數據同步的時候.

    他們的方案 就是我上面要做的那樣..   所以我才走了這條路線.

    非常感管理員..

    lmn40227
    參與者
    • 文章數量: 23
    @lmn40227
    樓主

    用户不經意輸入錯誤了密碼那麼保存了,這次是登錄了那下次就登錄不了.

    我也考慮過 那個問題, 至少第二次他可以用忘記密碼..     其實我上面更大的問題在於 “ 第一次是登錄失敗,   第一次和第二次輸入不一樣, 第一次登錄 都進入不了, 才是我最不想見到的.     不過目前我還未知道 如何修改能使第一次登錄 成功, 而不是第二次.

     

    SSO 單點登錄的方式, 我會好好研究下.   主要問題是原網站由 netsuite 做出來的.  密碼的數據是提取不出來的.

     

    因為我的目標是換系統,  netsuite 改成 woocomerce.     網址最終都將還是 同一個.

     

    lmn40227
    參與者
    • 文章數量: 23
    @lmn40227
    樓主

     

    最終效果就是 第一次登錄 雖然錯誤, 但改變了數據庫的密碼, 但第二次用同樣的密碼 就能登錄.

    麻煩的地方就是需要把數據庫裏的密碼 統一改成 “anythinguwant” . 用 sql 的寫一條語句的話也算是比較快了

     

    
    function wp_check_password($password, $hash, $user_id = 」) {
    global $wp_hasher;
    
    // If the hash is still md5…
    if ( strlen($hash) <= 32 & $hash != 「anythinguwant」) {
    $check = hash_equals( $hash, md5( $password ) );
    if ( $check && $user_id ) {
    // Rehash using new hash.
    wp_set_password($password, $user_id);
    $hash = wp_hash_password($password);
    }
    
    /**
    * Filters whether the plaintext password matches the encrypted password.
    *
    * @since 2.5.0
    *
    * @param bool $check Whether the passwords match.
    * @param string $password The plaintext password.
    * @param string $hash The hashed password.
    * @param string|int $user_id User ID. Can be empty.
    */
    return apply_filters( 『check_password』, $check, $password, $hash, $user_id );
    }else if(strlen($hash) <= 32 & $hash == 「anythinguwant」){
    
    if ( $user_id ) {
    // Rehash using new hash.
    wp_set_password($password, $user_id);
    $hash = wp_hash_password($password);
    }
    
    return apply_filters( 『check_password』, $check, $password, $hash, $user_id );
    
    }
    lmn40227
    參與者
    • 文章數量: 23
    @lmn40227
    樓主

    我開始問的那個有點含糊, 所以我附圖了這次, 其實我是想知道

    pluggable.php 裏 運用的  調用 authenticate 的函數, 如何進去密碼驗證的, 但是  上面找到所有關於 function authenticate 的函數都沒有進行密碼判斷, 我非常的不解.

     

    詩語,  我以前 另外一個網站也是通過你的這種方法弄的, 但是還是流失了很多客户, 所以這次 我想換種方式就是上面提到的方法.

     

    這次我反着走, 找到了 wordpress 專門用於判斷密碼的函數 ,  function wp_check_password($password, $hash, $user_id = ”)

    如果我有突破, 也會馬上更新在這裏,   謝謝你的幫助.

     

正在查看 6 個帖子:11-16 (共 16 個帖子)