Skip to:
Content

bbPress.org

Ticket #2210: 2210.01.patch

File 2210.01.patch, 598 bytes (added by r-a-y, 4 years ago)
  • src/includes/users/capabilities.php

     
    359359        // Get the current user's WordPress role. Set to empty string if none found.
    360360        $user_role   = bbp_get_user_blog_role( $user_id );
    361361
     362        // If no WordPress role, add default WordPress role.
     363        if ( false === $user_role ) {
     364                $user_role = get_option( 'default_role' );
     365                $bbp->current_user->add_role( $user_role );
     366        }
     367
    362368        // Get the role map
    363369        $role_map    = bbp_get_user_role_map();
    364370