Skip to:
Content

bbPress.org

Changeset 4355


Ignore:
Timestamp:
11/07/2012 09:22:50 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Capabilities:

  • When transitioning a user role, avoid giving them the visitor role unless explicitly intended.
  • See #1939.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/users/capabilities.php

    r4354 r4355  
    207207            // Add role to user account, making them a user of this site
    208208            if ( true == $add_to_site ) {
     209
     210                // Override map to prevent accidental "Visitor"
     211                if ( empty( $wp_role ) ) {
     212                    $bbp_role = bbp_get_default_role();
     213                }
     214
     215                // Add the mapped forums role to the user's account
    209216                $bbp->current_user->add_role( $bbp_role );
     217
     218                // @todo Add the default site role too?
     219                //$bbp->current_user->add_role( get_option( 'default_role' ) );
    210220
    211221            // Dynamically assign capabilities, making them "anonymous"
Note: See TracChangeset for help on using the changeset viewer.