mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Make lost password admin notification pluggable. Fixes #7430 props error.
git-svn-id: https://develop.svn.wordpress.org/trunk@8489 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+2
-7
@@ -190,12 +190,7 @@ function reset_password($key) {
|
||||
if ( !wp_mail($user->user_email, sprintf(__('[%s] Your new password'), get_option('blogname')), $message) )
|
||||
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
|
||||
|
||||
// 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 ( $user->user_email != get_option('admin_email') ) {
|
||||
$message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
|
||||
wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), get_option('blogname')), $message);
|
||||
}
|
||||
wp_password_change_notification($user);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -508,4 +503,4 @@ try{document.getElementById('user_login').focus();}catch(e){}
|
||||
|
||||
break;
|
||||
} // end action switch
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user