Ticket #44181: 44181.diff
File 44181.diff, 4.2 KB (added by , 7 years ago) |
---|
-
src/wp-admin/includes/user.php
671 671 case 'add_remove_personal_data_request': 672 672 check_admin_referer( 'personal-data-request' ); 673 673 674 if ( ! isset( $_POST['type_of_action'], $_POST['username_or_email_ to_export'] ) ) { // WPCS: input var ok.674 if ( ! isset( $_POST['type_of_action'], $_POST['username_or_email_for_privacy_request'] ) ) { // WPCS: input var ok. 675 675 add_settings_error( 676 676 'action_type', 677 677 'action_type', … … 680 680 ); 681 681 } 682 682 $action_type = sanitize_text_field( wp_unslash( $_POST['type_of_action'] ) ); // WPCS: input var ok. 683 $username_or_email_address = sanitize_text_field( wp_unslash( $_POST['username_or_email_ to_export'] ) ); // WPCS: input var ok.683 $username_or_email_address = sanitize_text_field( wp_unslash( $_POST['username_or_email_for_privacy_request'] ) ); // WPCS: input var ok. 684 684 $email_address = ''; 685 685 686 686 if ( ! in_array( $action_type, _wp_privacy_action_request_types(), true ) ) { … … 696 696 $user = get_user_by( 'login', $username_or_email_address ); 697 697 if ( ! $user instanceof WP_User ) { 698 698 add_settings_error( 699 'username_or_email_ to_export',700 'username_or_email_ to_export',699 'username_or_email_for_privacy_request', 700 'username_or_email_for_privacy_request', 701 701 __( 'Unable to add this request. A valid email address or username must be supplied.' ), 702 702 'error' 703 703 ); … … 716 716 717 717 if ( is_wp_error( $request_id ) ) { 718 718 add_settings_error( 719 'username_or_email_ to_export',720 'username_or_email_ to_export',719 'username_or_email_for_privacy_request', 720 'username_or_email_for_privacy_request', 721 721 $request_id->get_error_message(), 722 722 'error' 723 723 ); 724 724 break; 725 725 } elseif ( ! $request_id ) { 726 726 add_settings_error( 727 'username_or_email_ to_export',728 'username_or_email_ to_export',727 'username_or_email_for_privacy_request', 728 'username_or_email_for_privacy_request', 729 729 __( 'Unable to initiate confirmation request.' ), 730 730 'error' 731 731 ); … … 735 735 wp_send_user_request( $request_id ); 736 736 737 737 add_settings_error( 738 'username_or_email_ to_export',739 'username_or_email_ to_export',738 'username_or_email_for_privacy_request', 739 'username_or_email_for_privacy_request', 740 740 __( 'Confirmation request initiated successfully.' ), 741 741 'updated' 742 742 ); … … 814 814 <p><?php esc_html_e( 'An email will be sent to the user at this email address asking them to verify the request.' ); ?></p> 815 815 816 816 <div class="wp-privacy-request-form-field"> 817 <label for="username_or_email_ to_export"><?php esc_html_e( 'Username or email address' ); ?></label>818 <input type="text" required class="regular-text" id="username_or_email_ to_export" name="username_or_email_to_export" />817 <label for="username_or_email_for_privacy_request"><?php esc_html_e( 'Username or email address' ); ?></label> 818 <input type="text" required class="regular-text" id="username_or_email_for_privacy_request" name="username_or_email_for_privacy_request" /> 819 819 <?php submit_button( __( 'Send Request' ), 'secondary', 'submit', false ); ?> 820 820 </div> 821 821 <?php wp_nonce_field( 'personal-data-request' ); ?> … … 887 887 <p><?php esc_html_e( 'An email will be sent to the user at this email address asking them to verify the request.' ); ?></p> 888 888 889 889 <div class="wp-privacy-request-form-field"> 890 <label for="username_or_email_ to_export"><?php esc_html_e( 'Username or email address' ); ?></label>891 <input type="text" required class="regular-text" id="username_or_email_ to_export" name="username_or_email_to_export" />890 <label for="username_or_email_for_privacy_request"><?php esc_html_e( 'Username or email address' ); ?></label> 891 <input type="text" required class="regular-text" id="username_or_email_for_privacy_request" name="username_or_email_for_privacy_request" /> 892 892 <?php submit_button( __( 'Send Request' ), 'secondary', 'submit', false ); ?> 893 893 </div> 894 894 <?php wp_nonce_field( 'personal-data-request' ); ?>