From 196dd1f7e13e7251400691d50b29763195c2a370 Mon Sep 17 00:00:00 2001 From: Fernando Claussen Date: Mon, 4 Jun 2018 14:53:49 -0400 Subject: [PATCH] Updating send request email error messages to not indicate if user exist --- public/class-gdpr-requests-public.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/class-gdpr-requests-public.php b/public/class-gdpr-requests-public.php index 24cbeff7..90f1c1d8 100644 --- a/public/class-gdpr-requests-public.php +++ b/public/class-gdpr-requests-public.php @@ -142,8 +142,8 @@ public function send_request_email() { if ( ! $user instanceof WP_User ) { wp_send_json_error( array( - 'title' => esc_html__( 'Error!', 'gdpr' ), - 'content' => esc_html__( 'User not found.', 'gdpr' ), + 'title' => esc_html__( 'Email confirmation', 'gdpr' ), + 'content' => esc_html__( 'If this email is connected to an existing user, you should receive an email confirmation soon.', 'gdpr' ), ) ); } @@ -172,8 +172,8 @@ public function send_request_email() { if ( 1 === $admins_query->get_total() ) { wp_send_json_error( array( - 'title' => esc_html__( 'Error!', 'gdpr' ), - 'content' => esc_html__( 'We can\'t delete this user.', 'gdpr' ), + 'title' => esc_html__( 'Email confirmation', 'gdpr' ), + 'content' => esc_html__( 'If this email is connected to an existing user, you should receive an email confirmation soon.', 'gdpr' ), ) ); } @@ -234,7 +234,7 @@ public function send_request_email() { wp_send_json_success( array( 'title' => esc_html__( 'Email confirmation', 'gdpr' ), - 'content' => esc_html__( 'We\'ve sent you a confirmation email.', 'gdpr' ), + 'content' => esc_html__( 'If this email is connected to an existing user, you should receive an email confirmation soon.', 'gdpr' ), ) ); } else {