WordPress.org

Make WordPress Core

Ticket #49668: 49668.diff

File 49668.diff, 953 bytes (added by pbiron, 18 months ago)
  • src/wp-includes/user.php

    From ed5547902c67d7f58f5e9d7722c32eeabf4af216 Mon Sep 17 00:00:00 2001
    From: Paul Biron <paul@sparrowhawkcomputing.com>
    Date: Thu, 19 Mar 2020 16:30:07 -0600
    Subject: [PATCH] Limit user privacy exports initiated from a blog (including
     the main site) to users registered on that blog.
    
    ---
     src/wp-includes/user.php | 10 ++++++++++
     1 file changed, 10 insertions(+)
    
    diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
    index f0cc8c33bd..fc64fdfe2b 100644
    a b function wp_user_personal_data_exporter( $email_address ) { 
    29632963                );
    29642964        }
    29652965
     2966        if ( ! is_network_admin() ) {
     2967                $user_blogs = get_blogs_of_user( $user->ID, true );
     2968                if ( ! isset( $user_blogs[ get_current_blog_id() ] ) ) {
     2969                        return array(
     2970                                'data' => array(),
     2971                                'done' => true,
     2972                        );
     2973                }
     2974        }
     2975
    29662976        $user_meta = get_user_meta( $user->ID );
    29672977
    29682978        $user_props_to_export = array(