Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/25/2017 06:17:19 AM (8 years ago)
Author:
johnjamesjacoby
Message:

Roles: account for empty role in bbp_set_current_user_default_role()

This change makes sure that if a user's role does not match any known role, they still receive the default role for the site.

Trunk, for 2.6.

File:
1 edited

Legend:

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

    r6573 r6667  
    2020
    2121    // Filter & return
    22     return (array) apply_filters( 'bbp_get_topic_caps', array (
     22    return (array) apply_filters( 'bbp_get_topic_caps', array(
    2323        'edit_posts'          => 'edit_topics',
    2424        'edit_others_posts'   => 'edit_others_topics',
     
    4242
    4343    // Filter & return
    44     return (array) apply_filters( 'bbp_get_topic_tag_caps', array (
     44    return (array) apply_filters( 'bbp_get_topic_tag_caps', array(
    4545        'manage_terms' => 'manage_topic_tags',
    4646        'edit_terms'   => 'edit_topic_tags',
Note: See TracChangeset for help on using the changeset viewer.