The MU forums have moved to WordPress.org

Prevent members getting deleted on main blog when they create blogs? (9 posts)

  1. Rage00001
    Member
    Posted 14 years ago #

    Well.. I’m currently setting up a community solution where the majority will not create a blogs, and just be ordinary Subscribers.

    A few will of curse create blogs, and there is a function in WPMU that move the member to their new blog as an administrator.

    He willof curse need his privileges for his blog, but I want to keep him as a Subscriber (or whatever) on the main blog.

    Is there anything, a small fix, plugin or whatever that could prevent users getting deleted on main blog when they create blogs themselves?

    Thanks for all help :)

  2. Rage00001
    Member
    Posted 14 years ago #

    Anyone... ?

  3. Rage00001
    Member
    Posted 14 years ago #

    Is this a complete enigma to everybody...?

  4. dsader
    Member
    Posted 14 years ago #

    Stopping the delete stumps me.
    Instead, try to add user to blog 1 anytime a new blog is created using this in mu-plugins:

    <?php
    function rage_subs_stay_on_main_blog($blog_id, $user_id) {
    add_user_to_blog('1', $user_id, 'subscriber');
    }
    add_action( 'wpmu_new_blog', 'rage_subs_stay_on_main_blog', 10, 2 );
    ?>
  5. tdjcbe
    Member
    Posted 14 years ago #

    Actually I remember a trac ticket on this previously but all I can find is this right off:

    http://trac.mu.wordpress.org/changeset/1927

    which is not it.

    I could have sworn though this was resolved months ago. What version of wpmu are you using?

  6. andrea_r
    Moderator
    Posted 14 years ago #

    "I want to keep him as a Subscriber (or whatever) on the main blog."

    For what reasons? Just asking, because depending on why you need them as subscriber on the main blog, it may be overkill.

    Must be logged in to comment, for example, works for logged in users even if they are not subscribers to that blog.

    Needing to email everyone is also handled differently.

  7. Rage00001
    Member
    Posted 14 years ago #

    Thank you both for your reply...

    The solution which dsader is proposing may be the fix i would use if there is no other alternative what so ever. The problem with this method is that these users may not be subscribers on the main blog in the first place.

    So it would be far from a perfect solution because i then would have to manually give them their privileges back.

    tdjcbe, we are using 2.8.4a and the ticket you referred to is in place.

    I did try to put in blog id 1 in the admin page, but it disappeared after saving.. And it does say that it should be blank for the main site.

  8. Rage00001
    Member
    Posted 14 years ago #

    andrea_r, thank you for your reply..

    The "subscriber" may not be so critical, but we will have about 200 moderators, editors etc.

    And it's preferred that they have the main blog in their bloglist.

    I didn’t know that they could comment anyway though, so that was very useful information :)

  9. Rage00001
    Member
    Posted 14 years ago #

    So.. is there a solution to stop the deletion of members that are something else than Subscribers then?

About this Topic

  • Started 14 years ago by Rage00001
  • Latest reply from Rage00001