• How can I automatically add all new users to all sites on network as subscribers. Also, If anyone knows how to get the plugin subscribe2 to automatically subscribe all new users to all sites on the network?

    Thanks.
    -Braden

Viewing 15 replies - 1 through 15 (of 16 total)
  • New users are already automatically added as subscribers to one of your sites, which you specify in your Network Options page (listed as Options under the Super Admin menu in your admin). However all of those users already have permissions equivalent to subscribers on all of the other sites, even though they aren’t necessarily listed as such. (In short, they can view sites, leave comments on sites, and edit their own profile.)

    I don’t off the top of my head know of a plugin that allows users to be auto-assigned permissions across the entire network, but if you simply want to assign Subscriber permissions to everyone, it’s not entirely necessary to do so, since it doesn’t give them any more privileges than they already have.

    Thread Starter bradenunruh

    (@bradenunruh)

    That’s what I thought, but the issue I’m running into is that If a user logs into a site other than the main site and goes to the dashboard, it redirects them to the main site dashboard. They need to go to the dashboard for the non-main site to subscribe with the subscribe2 plugin.

    Hi Braden, I’ve just written a plugin which allocates newly registered users a role for each site. Rather than allocating a subscriber role, it lets the super admin specify a default role for each site. For something I’m doing, I wanted new users to receive the Author role for one site, Contributor for another and Subscriber for the rest.

    It’s not in www.ads-software.com plugin directory yet, I have to wait till my application is approved. But if you’d like to test it, send me an email to my username as show on the left at gmail.com and I’ll give you a download link.

    Thread Starter bradenunruh

    (@bradenunruh)

    That sounds perfect! I’ll shoot you an e-mail!

    For anyone else wanting to automatically add new users to each of their sites, the plugin is now in the WordPress plugin directory: Multisite User Management.

    Checkin’ it out now… ??

    webmacster87 said:

    New users are already automatically added as subscribers to one of your sites, which you specify in your Network Options page…

    So, WP 3.0 will allow you to automatically add all new users as a subscriber to the main blog? If so, why would one need the User Management plugin suggested by thenbrent?

    We’re still running WPMU 2.92 and preparing to upgrade. I was searching these forums to see if anyone might have feedback regarding this discussion about how to add all new users to main blog in the old MU forums.

    To add all new users as subscribers to our main blog, we currently use this “new user” custom plugin as directed in that topic:

    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 );

    Can someone please confirm if this would be 3.0 compatible or if it is no longer necessary?

    Thank you!

    They are pseudo-subscribers. They can be logged in to comment, but in some cases will not show up as “attached” to the main blog.

    And this is an issue if you’re using other plugins, mostly, especially if they pull a list of all subscribers.

    Also, if a user gets their own blog, they are de-attached (by default) from the main blog. they still have that pseudo-subscribers access tho.

    Codee looks fine to me, can;t see why it wouldn’t work. Best to wait & see if dsader chimes in. (yay for initialed function names!)

    I haven’t tested that particular code with WP3.0 per se, but I’ve used the wpmu_new_blog hook and can verify that it is still does its thang.

    Thanks! We’ll give it a shot since we do need to “attach” the users to our main blog for instant access to our SimplePress discussion forums.

    Anyone have any idea how this might affect add_user_to_blog if at all?

    wp_insert_user in 3.0 is not backwards compatible
    https://core.trac.www.ads-software.com/ticket/14308

    Dunno, never used wp_insert_user

    But I’ve used add_user_to_blog recently in WP3 and it works fine. Keep in mind, the code you pasted above hooks when a new blog is created.

    Hooking the “wpmu_new_user” may be better in your case if the new user chooses not to create a blog on signup:

    function ds_new_user_meta_2($user_id) {
    add_user_to_blog('1', $user_id, 'subscriber');
    }
    add_action( 'wpmu_new_user', 'ds_new_user_meta_2');

    @dsader Thanks for the suggestion, but for whatever reason, the script as is functions perfectly for us — all new users, with or without a blog, are getting added to blog 1 as subscribers. Since it ain’t broke I won’t be fixing it. ??

    Off Topic: How is it going with Toggle Admin Menus for WP 3.0? Anywhere I can subscribe for an update about that?

    Derek Fox

    (@thedigitalfox)

    For anyone else wanting to automatically add new users to each of their sites, the plugin is now in the WordPress plugin directory: Multisite User Management.

    @thenbrent thank you so much for creating this plug in because it is amazing … just what I was looking for. I am working on creating a WordPress Webmaster Academy (https://wordpresswebmasteracademy.com) and using network blogs to create different courses. i am using s2members and buddypress with network … very crazy if you ask me. But I was having an issue with someone signing up and then not getting the right role on the other blogs so this helped a ton.

    you saved my life! lol

    thanks
    Derek

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Automatically add all new users to all sites on network as subscribers.’ is closed to new replies.