IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    WordPress:禁用注册用户的时候的邮箱验证

    Adamhuan发表于 2017-04-28 07:17:46
    love 0

    在wordpress的使用过程中,注册用户的时候,默认是要通过邮箱验证,才可以拿到注册邮件的。
    如果需要跳过这一步,可以对wordpress的源码做如下修改:

    [root@oracle-cluster-3 ~]# cd /opt/lampp/htdocs/wordpress/wp-includes/
    [root@oracle-cluster-3 wp-includes]# ls -ltr | grep pluggable
    -rwxrwxrwx  1 root root   6262 Jul  6  2016 pluggable-deprecated.php
    -rwxrwxrwx  1 root root  86833 Mar 10 23:06 pluggable.php
    [root@oracle-cluster-3 wp-includes]# 
    [root@oracle-cluster-3 wp-includes]# cp pluggable.php pluggable.php_orig_20170428
    [root@oracle-cluster-3 wp-includes]# 
    
    [root@oracle-cluster-3 wp-includes]# cat -n pluggable.php | grep --color "wp_mail( get_option"
      1736                  wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Password Changed' ), $blogname ), $message );
      1778                  @wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] New User Registration' ), $blogname ), $message );
    [root@oracle-cluster-3 wp-includes]# 
    [root@oracle-cluster-3 wp-includes]#

    将上面的【New User Registration】的【wp_mail( get_option】的那一行注释掉就可以了。

    ——————————————
    Done。



沪ICP备19023445号-2号
友情链接