Register a user only to the root blog - WP Multisite

I have code to register a user from one of the blogs in WP Multi site:if($userId = wp_create_user($email, $pass, $email)

I have code to register a user from one of the blogs in WP Multi site:

if($userId = wp_create_user($email, $pass, $email)){
    var_dump(get_user_by_email($email));
}

The problem is that I want them to be registered NOT for the current site, but for the root site of the network.

I know I can use remove_user_from_blog, but it seems like a double work. Is there a way to register a user without attaching them to specific blog ?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745339921a4623277.html

相关推荐

  • Register a user only to the root blog - WP Multisite

    I have code to register a user from one of the blogs in WP Multi site:if($userId = wp_create_user($email, $pass, $email)

    3小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信