Changeset 9775
- Timestamp:
- 04/24/2020 08:07:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/privacy-functions.php
r8985 r9775 34 34 $email_user = get_user_by( 'email', $email ); 35 35 36 // check to see if the user is blocked, meaning they cannot log in 37 $blocked_user = false; 38 if ( $email_user instanceof \WP_User && defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) ) { 39 $support_user = new \WP_User( $email_user->ID, '', WPORG_SUPPORT_FORUMS_BLOGID ); 40 if ( ! empty( $support_user->allcaps['bbp_blocked'] ) ) { 41 // user is a blocked user, so for the purposes of this privacy request, don't expect them to login 42 $blocked_user = true; 43 } 44 } 45 36 46 if ( ! reCAPTCHA\check_status() ) { 37 47 $error_message = esc_html__( 'Your form session has expired. Please try again.', 'wporg' ); … … 43 53 } elseif ( 44 54 // Check if a user account exists for this email before processing. 45 false !== $email_user && $email_user->user_login !== $requesting_user 55 false !== $email_user && $email_user->user_login !== $requesting_user && ! $blocked_user 46 56 ) { 47 57 if ( is_user_logged_in() ) {
Note: See TracChangeset
for help on using the changeset viewer.