Making WordPress.org

Changeset 5671


Ignore:
Timestamp:
07/14/2017 01:52:30 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Support Forums, User Notes: Allow super admins to see notes on the current user.

See #2272.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-user-notes.php

    r5670 r5671  
    385385        $post_id = get_the_ID();
    386386
    387         // Notes are only displayed for other users.
    388         if ( $user_id == get_current_user_id() ) {
     387        // Only super admins can see notes on the current user.
     388        if ( ! is_super_admin() && $user_id == get_current_user_id() ) {
    389389            return;
    390390        }
     
    418418        $post_id = get_the_ID();
    419419
    420         // Notes are only displayed for other users.
    421         if ( $user_id == get_current_user_id() ) {
     420        // Only super admins can see notes on the current user.
     421        if ( ! is_super_admin() && $user_id == get_current_user_id() ) {
    422422            return;
    423423        }
     
    451451        $user_id = bbp_get_displayed_user_id();
    452452
    453         // Notes are only displayed for other users.
    454         if ( $user_id == get_current_user_id() ) {
     453        // Only super admins can see notes on the current user.
     454        if ( ! is_super_admin() && $user_id == get_current_user_id() ) {
    455455            return;
    456456        }
Note: See TracChangeset for help on using the changeset viewer.