• Starting a new topic as requested…

    It is my understanding that all new registered users under WP 3.1 MS are automatically assigned Subscriber status to blog ID 1, but this clearly does not seem to be the case (at least for us at tripawds.com) as they are not being listed under Site Admin as a user of the main site. The exception, however, is that new users who also create a blog/site are being assigned subscriber status to blog id 1. Those who create no site, are not.

    Now, we have been using the following in mu-plugins to automatically assign all new users main blog Subscriber status:

    function ds_new_user_meta($blog_id, $user_id) {
    add_user_to_blog('1', $user_id, 'subscriber' );
    }
    add_action( 'wpmu_new_blog', 'ds_new_user_meta', 10, 2 );

    It’s been working like a charm, until our 3.1 upgrade. Since then, only users who create a site are being added to the main site.

    So… My questions include:

    • Should all new users (with or without a bblog) appear as subscribers under the primary site admin / users?
    • Could this “new-user” plugin be keeping WP from doing its job?
    • Any suggested tweaks for getting this plugin working again under WP 3.1?

    Many thanks to all for any input.

    I did look into macbis’ Multisite User Management plugi, however, it appears to assign users to all sites, and we only want to add new users to site id 1. FYI: They need to be registered members of site id 1 where our SimplePress forums reside.

Viewing 12 replies - 31 through 42 (of 42 total)
  • They just show up.

    your main site has a blog ID of 1.

    Where is the mu-plugins folder? I can only see wp-content/plugins but there is no multi user plugin folder in there.

    Thread Starter agreda

    (@agreda)

    Where is the mu-plugins folder?

    wp-content/mu-plugins

    If it’s not there, you need to create the directory as ipstenu mentioned above.

    The plugin will only affect new user registrations. Existing users would not be added to the site (blog). If you’re saying you added it and users can’t access your forums, remove it.

    FYI: We use the following to add all new registered users as subscriber members of the main blog (site id 1) so they automatically become members of the SimplePress forums we host there. This works whether they create a blog or night.

    <?php
    
    function tri_new_user($user_id) {
    add_user_to_blog('1', $user_id, 'subscriber');
    }
    add_action( 'wpmu_new_user', 'tri_new_user');
    
    function tri_new_blogger($blog_id, $user_id) {
    add_user_to_blog('1', $user_id, 'subscriber' );
    }
    add_action( 'wpmu_new_blog', 'tri_new_blogger', 10, 2 );
    
    ?>

    Hope this helps.

    Clarification: We have edited the function for our reference. You’ll notice that “tri_new_user” basically does the same as “activate_user”.

    Should I use tri_new_user or activate_user?

    What do I do about the existing users as this is what my current problem is.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Add them in manually I suppose. How many are we talking about? If it’s a “dude what a hassle!” number, maybe we can kick our heads together and code it up…

    Manual is fine but how?

    They’re already in the overall system they just need to be tied to the blogs.

    Go to the site admin -> User menu and click “add user”.

    Thanks I know that. But in this case the user already exists. I just need to make them part of the blog.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Do it from the main site, NOT the network dash. There is an option there to add existing users by name or email.

    DOH…. Got it.

    Thanks for all the help.

    Great feed. But I have a couple of hundred “Ghosts” on a multi-site configuration and need to get them assigned to the main site. The owner of the site upgraded to 3.1 without checking with us first and now, weeks later, is getting complaints form his users that they can’t do what they need. Now, he wants us to fix it.

    Any ideas on how to do this in bulk instead of spending hour after hour scouring the users and copying their username to add them the manual way?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You can do it via the database. Pick one ghost user, make a note of the user ID, and change them correctly.

    Now search through the DB and find the usermeta tables. You SHOULD be able to see permissions per blog in there (blanking on the actual name of the field!) and you can search for people without it and add it in. CAREFULLY. but that’ll be faster once you sort out the before/after part.

Viewing 12 replies - 31 through 42 (of 42 total)
  • The topic ‘Adding All New Users to Main Site’ is closed to new replies.