Skip to:
Content

bbPress.org


Ignore:
Timestamp:
09/15/2017 05:30:53 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Users: use bbp_set_user_role() in bbp_set_current_user_default_role().

This change makes sure forum users only have 1 forum role, subsequently calling the bbp_set_user_role filter where expected. This will fix a rare situation where a weird role map could cause the default role to be re-added.

File:
1 edited

Legend:

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

    r6707 r6708  
    374374    // Add the user to the site
    375375    if ( true === $add_to_site ) {
    376         $bbp->current_user->add_role( $new_role );
     376        bbp_set_user_role( $user_id, $new_role );
    377377
    378378    // Don't add the user, but still give them the correct caps dynamically
Note: See TracChangeset for help on using the changeset viewer.