• Feriman

    (@feriman)


    Hi,

    I found better solution for solve this problem without plugin.

    Backup your wp-includes/pluggable.php
    Edit wp-includes/pluggable.php file
    Find wp_password_change_notification part
    Delete these lines from file:

    if ( !function_exists('wp_password_change_notification') ) :
    /**
     * Notify the blog admin of a user changing password, normally via email.
     *
     * @since 2.7.0
     *
     * @param object $user User Object
     */
    function wp_password_change_notification(&$user) {
    	// send a copy of password change notification to the admin
    	// but check to see if it's the admin whose password we're changing, and skip this
    	if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) {
    		$message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
    		// The blogname option is escaped with esc_html on the way into the database in sanitize_option
    		// we want to reverse this for the plain text arena of emails.
    		$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    		wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), $blogname), $message);
    	}
    }
    endif;

    Save.

    Enjoy.

    https://ww.wp.xz.cn/plugins/disable-password-change-email/

Viewing 1 replies (of 1 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Don’t edit core WordPress files, it’s always a bad idea.

    When an update is released then those changes will be lost, if you make a mistake you could render your installation unstable.

    A plugin is a better solution because it doesn’t require you to edit core WordPress files and is easier to maintain.

Viewing 1 replies (of 1 total)

The topic ‘I found better solution’ is closed to new replies.