From f108a2a42f7b7bbfcfaae3f67009047eeba1f04b Mon Sep 17 00:00:00 2001 From: ashubawork Date: Fri, 24 Apr 2020 12:25:34 +0300 Subject: [PATCH] - fix erase user data field --- includes/core/um-actions-account.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/core/um-actions-account.php b/includes/core/um-actions-account.php index 0c916570..3db952b4 100644 --- a/includes/core/um-actions-account.php +++ b/includes/core/um-actions-account.php @@ -551,9 +551,9 @@ function um_after_account_privacy( $args ) { $pending = $wpdb->get_results( "SELECT ID, post_status FROM $wpdb->posts WHERE post_author = $user_id AND post_type = 'user_request' AND post_name = 'remove_personal_data' AND post_status != 'request-completed' ORDER BY ID DESC LIMIT 1", ARRAY_A ); - if ( $pending[0]['post_status'] == 'request-pending' ) { + if ( ! empty( $pending ) && $pending[0]['post_status'] == 'request-pending' ) { echo '

' . esc_html__( 'A confirmation email has been sent to your email. Click the link within the email to confirm your export request.', 'ultimate-member' ) . '

'; - } elseif ( $pending[0]['post_status'] == 'request-confirmed' ) { + } elseif ( ! empty( $pending ) && $pending[0]['post_status'] == 'request-confirmed' ) { echo '

' . esc_html__( 'The administrator has not yet approved deleting your data. Please expect an email with a link to your data.', 'ultimate-member' ) . '

'; } else { ?>