Created
June 27, 2014 14:08
-
-
Save anonymous/865365c8390ed057c17f to your computer and use it in GitHub Desktop.
Email notification on wordpress user profile change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_admin_notification_profile_update($userid) { | |
$userdata = get_userdata($userid); | |
$message = "A user profile has been updated\n\n"; | |
$message .= print_r($userdata,true); | |
@wp_mail(get_option('admin_email'), 'User Profile Update', $message); | |
} | |
add_action('profile_update','my_admin_notification_profile_update'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment