Making WordPress.org

Changeset 11747


Ignore:
Timestamp:
04/05/2022 05:26:08 AM (2 years ago)
Author:
dd32
Message:

Plugin Directory: Restore the $user variable which was inadvertantly moved during testing.

See #5654.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-capabilities.php

    r11744 r11747  
    4444            return array( 'do_not_allow' );
    4545        }
     46
     47        // The current user instance.
     48        $user = new \WP_User( $user_id );
    4649
    4750        // Start over, we'll specify all caps below.
     
    106109        }
    107110
    108         // Allow users with review caps to access.
    109         $user = new \WP_User( $user_id );
     111        // Allow users with review caps to access, unless they've been explicitly denied above.
    110112        if ( $user->has_cap( 'plugin_review' ) ) {
    111113            $required_caps[] = 'plugin_review';
Note: See TracChangeset for help on using the changeset viewer.