Reply To: Correlating WP roles with BBPress roles
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’);