Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Correlating WP roles with BBPress roles

@zirow

Participant

I’ve tried @robin-w snippit above but didnt work with my current wordpress version(latest one according to the date of my post) but i managed to get it working with this snippit if anyone needs it.

Note: I’m a beginner to wordpress and bbpress so there might be other better ways of doing this.

function change_role(){
$user_id = $user->ID ;
if( current_user_can(‘administrator’)){

bbp_set_user_role( $user_id, ‘bbp_keymaster’ );

}
}
add_action(‘wp_login’, ‘change_role’);

Skip to toolbar