Forums

The WordPress MU forums have moved to the MultiSite forum on WordPress.org

User registration to sub-blog problems (1 post)

  1. jlm99
    Member
    Posted 2 years ago #

    Hi folks; I haven't been able to figure out a solution for these two problems:

    First, I need already-registered users to be able to register on sub-blogs (e.g., as subscriber). The closest I've come is the WPMU Blog Registrations plugin, but that only allows unregistered users to create new accounts. Any hacking advice? Should I copy wp-register.php and make a new

    Second, like many WPMU users, I need all users subscribed to blog 1 for certain plugins. I found this solution (thanks dsader!) for when users sign up themselves, but nothing that works when a sub-blog admin adds new users. So, even with dsader's fix, if the admin of blog7.example.com adds "newuser" in the back end, "newuser" is only subscribed to blog7 and not the main blog. Is there an action hook for admins manually adding users in wpmu?

    FYI, here's the code i'm running (in /mu-plugins/), based on the thread I linked above:

    add_action( 'wpmu_new_user', 'ds_new_user_meta', 10, 2);
    add_action( 'user_register', 'ds_new_user_meta', 10, 2); // I added this to work with WPMU Blog Registrations plugin
    function ds_new_user_meta($user_id) {
         add_user_to_blog('1', $user_id, 'subscriber');
    }

    Thanks in advance for your help!

Topic Closed

This topic has been closed to new replies.

About this Topic