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:
Peter Westwood
2008-07-29 20:21:34 +00:00
parent 9099a0e896
commit 0737fd60d5
2 changed files with 21 additions and 8 deletions

View File

@@ -990,6 +990,24 @@ function wp_notify_moderator($comment_id) {
}
endif;
if ( !function_exists('wp_password_change_notification') ) :
/**
* Notify the blog admin of a user changing password, normally via email.
*
* @since 2.7
*
* @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 ( $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);
}
}
endif;
if ( !function_exists('wp_new_user_notification') ) :
/**
* Notify the blog admin of a new user, normally via email.
@@ -1562,4 +1580,4 @@ function wp_text_diff( $left_string, $right_string, $args = null ) {
}
endif;
?>
?>