Making WordPress.org

Changeset 5670


Ignore:
Timestamp:
07/14/2017 12:23:26 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Support Forums, User Notes: Make sure notes are only displayed for other users.

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

    r5669 r5670  
    385385        $post_id = get_the_ID();
    386386
     387        // Notes are only displayed for other users.
     388        if ( $user_id == get_current_user_id() ) {
     389            return;
     390        }
     391
    387392        // Only keymasters can see notes on moderators.
    388393        if ( user_can( $user_id, 'moderate' ) && ! current_user_can( 'keep_gate' ) ) {
     
    413418        $post_id = get_the_ID();
    414419
     420        // Notes are only displayed for other users.
     421        if ( $user_id == get_current_user_id() ) {
     422            return;
     423        }
     424
    415425        // Only keymasters can see notes on moderators.
    416426        if ( user_can( $user_id, 'moderate' ) && ! current_user_can( 'keep_gate' ) ) {
     
    440450
    441451        $user_id = bbp_get_displayed_user_id();
     452
     453        // Notes are only displayed for other users.
     454        if ( $user_id == get_current_user_id() ) {
     455            return;
     456        }
    442457
    443458        // Only keymasters can see notes on moderators.
Note: See TracChangeset for help on using the changeset viewer.