Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/13/2011 08:07:43 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Prevent guest users from editing topics and replies if anonymous posting is active. See #1678. (2.1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-core-compatibility.php

    r3589 r3600  
    16861686
    16871687            // Only allow super admins on multisite to edit every user.
    1688             if ( ( is_multisite() && !current_user_can( 'manage_network_users' ) && ( $user->ID != bbp_get_current_user_id ) && !apply_filters( 'enable_edit_any_user_configuration', true ) ) || !current_user_can( 'edit_user', $user->ID ) ) {
     1688            if ( !is_user_logged_in() && ( ( is_multisite() && !current_user_can( 'manage_network_users' ) && ( $user->ID != bbp_get_current_user_id() ) && !apply_filters( 'enable_edit_any_user_configuration', true ) ) || !current_user_can( 'edit_user', $user->ID ) ) ) {
    16891689                wp_die( __( 'You do not have permission to edit this user.', 'bbpress' ) );
    16901690            }
     
    17481748    // Topic/Reply Edit Page
    17491749    } elseif ( !empty( $is_edit ) ) {
     1750
     1751        // Bail from edit if user is not logged in
     1752        if ( !is_user_logged_in() )
     1753            return;
    17501754
    17511755        // Get the post type from the main query loop
Note: See TracChangeset for help on using the changeset viewer.