Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: User Roles, WP & BBpress


anmari
Participant

@anmari

For the info of anyone chancing up on this.

wrt The plugin that justin mentions above. After integrating bbpress and wp 3.0.1, i had my existing members showing up in bbpress as inactive. Not: inactive (no role)

I changed the plugin as follows: – added the else line

function inactive_to_member() {

$userID = bb_get_current_user_info( 'id' );
$user_obj = new BP_User( $userID );
$user = bb_get_user( bb_get_user_id( $userID ) );
if(empty($user->capabilities)) {
$user_obj->set_role('member');
}
else if (is_array($user->capabilities) and ($user->capabilities['inactive'])) $user_obj->set_role('member');
}
add_action ('bb_head', 'inactive_to_member', 5, 0);

Skip to toolbar