I'm using the following code suggested on these forums to add new users to selected blogs. It works great. While the option exists to have new users added with a specific role (in this case Contributor), ideally I'd like to have new users added to the primary blog in one role, but for the remainder in another role (author in primary and contributor in the rest). Any ideas?
<?php
add_action( 'wpmu_new_user', 'ds_new_user_meta', 10, 2);
function ds_new_user_meta($user_id) {
$blogs = array(1,2,3,4,5);
foreach ($blogs as $blog) {
add_user_to_blog($blog, $user_id, 'contributor');
}
// adds every new user to blog_id 1 to 5
} ?>