Skip to:
Content

bbPress.org

Changeset 4320


Ignore:
Timestamp:
11/03/2012 08:33:03 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Capabilities:

  • Remove all previous forums roles in bbp_set_user_role().
  • Use direct array intersection instead of bbp_get_user_role().
  • Fixes issue where users can have more than 1 forum role.
  • See #1939.
File:
1 edited

Legend:

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

    r4317 r4320  
    13891389
    13901390        // Remove previous forum roles if any exist
    1391         $roles = bbp_get_user_role( $user_id );
     1391        $roles = array_intersect( array_values( $user->roles ), array_keys( bbp_get_editable_roles() ) );
    13921392
    13931393        if ( !empty( $roles ) ) {
Note: See TracChangeset for help on using the changeset viewer.