Make WordPress Core


Ignore:
Timestamp:
07/29/2008 08:21:34 PM (18 years ago)
Author:
westi
Message:

Make lost password admin notification pluggable. Fixes #7430 props error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r8324 r8489  
    991991endif;
    992992
     993if ( !function_exists('wp_password_change_notification') ) :
     994/**
     995 * Notify the blog admin of a user changing password, normally via email.
     996 *
     997 * @since 2.7
     998 *
     999 * @param object $user User Object
     1000 */
     1001function wp_password_change_notification(&$user) {
     1002        // send a copy of password change notification to the admin
     1003        // but check to see if it's the admin whose password we're changing, and skip this
     1004        if ( $user->user_email != get_option('admin_email') ) {
     1005                $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
     1006                wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), get_option('blogname')), $message);
     1007        }
     1008}
     1009endif;
     1010
    9931011if ( !function_exists('wp_new_user_notification') ) :
    9941012/**
Note: See TracChangeset for help on using the changeset viewer.