Title: Suggested code change
Last modified: March 22, 2019

---

# Suggested code change

 *  [LABCAT](https://wordpress.org/support/users/labcat/)
 * (@labcat)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/suggested-code-change/)
 * I have set up delete me on the front end using the password requirement. This
   works well except when a user gets their password incorrect as no error message
   is displayed.
 * I have found a workaround by one line of code in delete_user.php to pass an error
   message back to the page the form submission came from.
 *     ```
       // Confirm Password Required?
       $your_profile_confirmation_page = ( is_admin() && basename( $_SERVER['SCRIPT_NAME'] ) == 'options.php' && $this->GET['page'] == ( $this->info['slug_prefix'] . '_confirmation' ) ) ? true : false;
       if ( ( $your_profile_confirmation_page && $this->option['settings']['your_profile_confirm_password_required'] ) || ( !$your_profile_confirmation_page && $this->option['settings']['shortcode_form_enabled'] ) ) {
   
       	$this->POST = $this->striptrim_deep( $_POST );
       	$password_entered = '';
       	$password_entered = isset( $this->POST[$this->info['trigger'] . '_your_profile_confirm_password'] ) ? $this->POST[$this->info['trigger'] . '_your_profile_confirm_password'] : $password_entered;
       	$password_entered = isset( $this->POST[$this->info['trigger'] . '_shortcode_password'] ) ? $this->POST[$this->info['trigger'] . '_shortcode_password'] : $password_entered;
   
       	if ( empty( $password_entered ) || empty( $user ) || wp_check_password( $password_entered, $user->data->user_pass ) !== true ) {
       		$_POST[ 'error_msg' ] = 'Sorry, your password was incorrect.';
       		return; // stop executing file
       	}
   
       }
       ```
   
 * Do you think it would be possible to add that to the main repository so that 
   I don’t need to maintain a forked version?

Viewing 1 replies (of 1 total)

 *  Plugin Author [cmc3215](https://wordpress.org/support/users/cmc3215/)
 * (@cmc3215)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/suggested-code-change/#post-11430552)
 * Hi LABCAT,
 * Thanks for your post. I can see the value in having an error message for incorrect
   passwords. I will consider adding an option in the next release for controlling
   an error message.
 * Kind regards,
 * Clint

Viewing 1 replies (of 1 total)

The topic ‘Suggested code change’ is closed to new replies.

 * ![](https://ps.w.org/delete-me/assets/icon-128x128.png?rev=970332)
 * [Delete Me](https://wordpress.org/plugins/delete-me/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/delete-me/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/delete-me/)
 * [Active Topics](https://wordpress.org/support/plugin/delete-me/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/delete-me/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/delete-me/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [cmc3215](https://wordpress.org/support/users/cmc3215/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/suggested-code-change/#post-11430552)
 * Status: not a support question