Skip to:
Content

bbPress.org

Changeset 4527


Ignore:
Timestamp:
11/26/2012 06:07:33 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Roles:

  • When updating bbPress and normalizing user roles, remove the old moderator and participant roles from the database.
  • Props jmdodd.
  • Fixes #2065.
Location:
trunk/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/admin/tools.php

    r4526 r4527  
    11161116
    11171117        $statement  = __( 'Deleting Settings… %s', 'bbpress' );
    1118         $sql_delete = bbp_delete_options();
     1118        bbp_delete_options();
    11191119        $messages[] = sprintf( $statement, $success );
    11201120
     
    11221122
    11231123        $statement  = __( 'Deleting Roles and Capabilities… %s', 'bbpress' );
    1124         $sql_delete = bbp_remove_roles();
    1125         $sql_delete = bbp_remove_caps();
     1124        remove_role( bbp_get_moderator_role() );
     1125        remove_role( bbp_get_participant_role() );
     1126        bp_remove_caps();
    11261127        $messages[] = sprintf( $statement, $success );
    11271128
  • trunk/includes/core/update.php

    r4526 r4527  
    248248    if ( $raw_db_version < 220 ) {
    249249
    250         // Refresh capabilities
     250        // Remove the Moderator role from the database
     251        remove_role( bbp_get_moderator_role() );
     252
     253        // Remove the Participant role from the database
     254        remove_role( bbp_get_participant_role() );
     255
     256        // Remove capabilities
    251257        bbp_remove_caps();
    252258    }
Note: See TracChangeset for help on using the changeset viewer.