Support » Plugins » Notify admin when user updates profile

  • Resolved Turbo123


    Everytime a registerd user updates their profile, I would like the administrator to get an email notification about this.

    How can this be done?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I am also looking for a solution to this problem. We have a lot of authors and would like to be notified if they update their information – as of now we have all their profiles automatically show up on our site. It would be nice to keep tabs on the content of their profile. We review what they post, we also want to review or at least be notified of their profile changes as well.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    You could write a plugin that hooks to the profile_update action, and then email the user info to you when it triggers.

    function user_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);

    That’s quick and dirty. You could pretty it up if you really wanted to, I’m sure.

    Stuck that on the end of registration.php and it works like a charm. thanks! I will probably try to pretty it up when I get a chance. Wonderful – I wasn’t sure where the hook was. Thanks so much!

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    You really should not stick it into any core files. Put it in your theme’s functions.php, or in a plugin instead.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Notify admin when user updates profile’ is closed to new replies.