enable_edit_any_user_configuration

  • apply_filters( 'enable_edit_any_user_configuration', true ) ) || !current_user_can( 'edit_user', $user->ID ) )

    Source Reference:

    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-core-compatibility.php :: Trac Source Line: 1574
      			return;
      		}
      
      		/** User Exists *******************************************************/
      
      		// View or edit?
      		if ( !empty( $is_edit ) ) {
      
      			// Only allow super admins on multisite to edit every user.
      			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 ) ) {
      				wp_die( __( 'You do not have the permission to edit this user.', 'bbpress' ) );
      			}
      
      			// We are editing a profile
      			$posts_query->bbp_is_single_user_edit = true;
      
      			// Load the core WordPress contact methods
      			if ( !function_exists( '_wp_get_user_contactmethods' ) ) {
      				include_once( ABSPATH . 'wp-includes/registration.php' );
      			}
      

Comments are closed.