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 ) { |
2963 | 2963 | ); |
2964 | 2964 | } |
2965 | 2965 | |
| 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 | |
2966 | 2976 | $user_meta = get_user_meta( $user->ID ); |
2967 | 2977 | |
2968 | 2978 | $user_props_to_export = array( |