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 个帖子)