Skip to:
Content

bbPress.org

Changeset 3602


Ignore:
Timestamp:
11/13/2011 08:13:40 PM (10 years ago)
Author:
johnjamesjacoby
Message:

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

File:
1 edited

Legend:

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

    r3540 r3602  
    15721572
    15731573            // Only allow super admins on multisite to edit every user.
    1574             if ( ( is_multisite() && !current_user_can( 'manage_network_users' ) && $user_id != $current_user->ID && !apply_filters( 'enable_edit_any_user_configuration', true ) ) || !current_user_can( 'edit_user', $user->ID ) ) {
     1574            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 ) ) {
    15751575                wp_die( __( 'You do not have the permission to edit this user.', 'bbpress' ) );
    15761576            }
     
    16311631    // Topic/Reply Edit Page
    16321632    } elseif ( !empty( $is_edit ) ) {
     1633
     1634        // Bail from edit if user is not logged in
     1635        if ( !is_user_logged_in() ) {
     1636            return;
     1637        }
    16331638
    16341639        // We are editing a topic
Note: See TracChangeset for help on using the changeset viewer.