Title: Notify admin upon profile update?
Last modified: June 13, 2018

---

# Notify admin upon profile update?

 *  [wwwcre8r](https://wordpress.org/support/users/wwwcre8r/)
 * (@wwwcre8r)
 * [8 years ago](https://wordpress.org/support/topic/notify-admin-upon-profile-update/)
 * I have the following in my functions.php file, it was working… it’s possible 
   that plugin updates broke it. Disabled non-critical plugins, running WP 4.9.6,
   and UM 2.0.17
    This no longer triggers the email to be sent.
 * // Run on successful submit profile form
    add_action(‘um_user_edit_profile’, ‘
   um_post_edit_pending_hook’, 10, 2); function um_post_edit_pending_hook($user_id,
   $args) {
 *  get_currentuserinfo();
 *  if ( is_user_logged_in() ) {
 *  $to = ‘john.doe@example.com’;
    $subject = ‘User has updated their profile’; 
   $message = ‘You will receive this email when a user edits their profile.’;
 *  wp_mail( $to, $subject, $message );
 *  }
 * }

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Ultimate Member Support](https://wordpress.org/support/users/ultimatemembersupport/)
 * (@ultimatemembersupport)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/notify-admin-upon-profile-update/#post-10413840)
 * Hi [@wwwcre8r](https://wordpress.org/support/users/wwwcre8r/),
 * Please use this code:
 *     ```
       // Run on successful submit profile form
       add_action(‘um_user_edit_profile’, ‘um_post_edit_pending_hook’, 10, 1);
       function um_post_edit_pending_hook($args) {
       $user_id = $args['user_id'];
       get_currentuserinfo();
   
       if ( is_user_logged_in() ) {
   
       $to = ‘john.doe@example.com’;
       $subject = ‘User has updated their profile’;
       $message = ‘You will receive this email when a user edits their profile.’;
   
       wp_mail( $to, $subject, $message );
   
       }
   
       }
       ```
   
 * Regards.
    -  This reply was modified 7 years, 12 months ago by [Ultimate Member Support](https://wordpress.org/support/users/ultimatemembersupport/).
 *  Thread Starter [wwwcre8r](https://wordpress.org/support/users/wwwcre8r/)
 * (@wwwcre8r)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/notify-admin-upon-profile-update/#post-10415996)
 * I cannot get this to work (I added it to the end of my theme’s functions.php 
   file), is someone able to test this on a site? I setup two other brand-new environments(
   on separate hosts), with no luck.
 * I can submit forms and I receive those emails, so mail is leaving the server.
 * But users who edit their profiles and submit (/?profiletab=main&um_action=edit),
   the data saves… but no email is triggered.
 * Any other thoughts on how to troubleshoot this and get it to work?
 * Regards, Will
 *  Thread Starter [wwwcre8r](https://wordpress.org/support/users/wwwcre8r/)
 * (@wwwcre8r)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/notify-admin-upon-profile-update/#post-10421828)
 * Can someone *please* confirm that this code (above from ultimatemembersupport)
   actually works with WP 4.9.6, and UM 2.0.17 ?
 * Please, I am begging!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Notify admin upon profile update?’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)

 * 3 replies
 * 2 participants
 * Last reply from: [wwwcre8r](https://wordpress.org/support/users/wwwcre8r/)
 * Last activity: [7 years, 12 months ago](https://wordpress.org/support/topic/notify-admin-upon-profile-update/#post-10421828)
 * Status: not resolved