Skip to:
Content

bbPress.org

Ticket #2042: 2042.001.patch

File 2042.001.patch, 572 bytes (added by nerrad, 13 years ago)

make sure any custom roles added by a plugin are given default bbp role

  • includes/users/capabilities.php

     
    237237                        }
    238238
    239239                        break;
     240                } else {
     241                        //let's give other roles not in the map the default bbp_role
     242                        if ( true == $add_to_site ) {
     243                                $bbp_role = bbp_get_default_role();
     244                                $bbp->current_user->add_role( $bbp_role );
     245                        } else {
     246                                $bbp->current_user->caps[$bbp_role] = true;
     247                                $bbp->current_user->get_role_caps();
     248                        }
    240249                }
    241250        }
    242251}