Disable password changed/reset e-mail notification

One of the bigger projects I am working on currently has 30k+ users. Having that many users means that many also will reset their password, and you will receive an e-mail every time.

So how do you disable it?

The function sending this e-mail is called wp_password_change_notification and is declared in pluggable.php. The great thing about the functions in pluggable.php is that if you declare a function with the same name as one of its functions, your function will overwrite it.

So if you want to disable it, simply create a plugin with these lines of code:

if ( !function_exists( 'wp_password_change_notification' ) ) {
 function wp_password_change_notification() {}
}

Update: Earlier I said that you could write these lines in your functions.php but as Stefan pointed out, it does not seem to work

Advertisements
About

Web Developer @ Oakwood Creative - www.oakwood.se

Tagged with: , ,
Posted in Beginner
12 comments on “Disable password changed/reset e-mail notification
  1. Stefan says:

    This would be great!!
    But does this really work? There is no change for me, I still get those annoying emails when users change/resets password.
    (wordpress 3.1)

  2. Another option would be to insert the code in your wp-config before “require_once(ABSPATH . ‘wp-settings.php’);”

  3. I have put together a plugin that puts implements the disabling the sending of password changed notification:

    http://wordpress.org/extend/plugins/disable-password-change-email/

    It’s based on the helpful info I found in your post 🙂

  4. rheide says:

    Is this working for you guys? I have installed and activated the plugin and we still receive the emails. Thanks in advance!

  5. Doktor Mobil says:

    It looks like it’s not working any more Compatible up to: 3.3.2….

  6. c.bavota says:

    If you hook it into the ‘muplugins_loaded’ action it should work. Testing it out now.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

About

WordPress Quick Tips is a blog supplying great tips about WordPress.

We hope to create a great knowledge resource for WordPress developers as well as serving a reminder for all the forgetful ones.

The blog is created and run by Vincent of Oakwood Creative

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 120 other followers

%d bloggers like this: