Re: bbpress + wpmu user registration default role
Well, it turns out I shouldn’t play with bbpress/wpmu when I’m tired at 2am. I never ended up activating the plugin . Anyways, I got the code that Detective wrote to work once I pulled my head outta my butt!
Here’s for anyone else that has this problem…
toss this into a file called default-role.php and put it in your my-plugins directory within your bbpress install folder.
<?php
/*
Plugin Name: bbpress wpmu default role
Plugin URI: https://bbpress.org/forums/topic/yet-another-integration-bug-no-role-set-on-registration?replies=5
Description: Sets a default WPMU role for all new bbpress users.
Author: Detective
Author URI: http://www.ryuuko.cl/
*/
function wpbb_add_user_role_rk($user_id) {
$user = new WP_User($user_id);
$user->set_role(get_option(‘default_role’));
}
add_action( ‘bb_new_user’, ‘wpbb_add_user_role_rk’);
?>