Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/16/2017 09:37:25 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Super Moderators: prefer edit_user with an ID over edit_users without one.

This change makes sure we know exactly which user ID the user is trying to edit. In cases where there is no ID available, we'll try to guess at the displayed user ID, and if that's empty too, we'll do nothing.

This allows the "User Role" template part to load properly for Super Moderators.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/templates/default/bbpress/user-subscriptions.php

    r6258 r6575  
    1515<?php if ( bbp_is_subscriptions_active() ) : ?>
    1616
    17     <?php if ( bbp_is_user_home() || current_user_can( 'edit_users' ) ) : ?>
     17    <?php if ( bbp_is_user_home() || current_user_can( 'edit_user', bbp_get_displayed_user_id() ) ) : ?>
    1818
    1919        <div id="bbp-user-subscriptions" class="bbp-user-subscriptions">
Note: See TracChangeset for help on using the changeset viewer.