Posted by: Vincent on: March 23, 2011
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
Another option would be to insert the code in your wp-config before “require_once(ABSPATH . ‘wp-settings.php’);”
March 25, 2011 at 3:35 pm
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)
March 25, 2011 at 3:51 pm
It does for me. I did it as a plugin though. I’m not sure if that makes a difference.
March 25, 2011 at 4:26 pm
Yes.
It works as a plugin!
( maybe pluggable.php loads before functions.php but after all the plugins )
March 25, 2011 at 5:14 pm
Yeah, I’ll edit my post and mention that!