Something like this could do it for you in “mu-plugins”:
When a user registers, that user will be added to each blog as a subscriber.
add_action( 'user_register', 'ds_new_user_meta', 10, 2);
function ds_new_user_meta($user_id) {
//$blogs = array(1,2,3);
$blogs = $wpdb->get_results( $wpdb->prepare("SELECT blog_id FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' ", $wpdb->siteid), ARRAY_A );
foreach ($blogs as $blog) {
add_user_to_blog($blog['blog_id'], $user_id, 'subscriber');
}
// adds every new user to all "public" blogs
}
Where would this code be added? Is this still the best method?
Thx
CT
If you;re looking for users to just have permission to comment while logged, in they have that by default.
If you need more, use the code above like dsader said, in mu-plugins folder.