Add Current users WPMU to All Future Blogs Created by Admin

0 replies
i'm running into a quandry here.. I need to write a wp plugin to add all current contributors to any new blogs created by admin in wpmu.. any ideas? to this point I have it adding new users to all existing blogs with this:

<?php
add_action('wpmu_new_user', 'reg_user_as_contributor');

function reg_user_as_contributor($user_id){
$blog_array = get_blogs_of_user(1);
foreach($blog_array as $admin_blog){
add_user_to_blog( $admin_blog->userblog_id, $user_id, 'contributor' );
}
}
?>
#add #admin #blogs #created #current #future #users #wpmu

Trending Topics