Forums

Send an email if a user updates their profile (5 posts)

  1. Clicknathan
    Member
    Posted 7 months ago #

    Anyone know of a plugin or functions.php method to make WP send an email to a user when their profile has been updated?

    The topic was asked here: http://wordpress.org/support/topic/forcing-users-to-reconfirm-if-they-change-their-email-address?replies=1

    ...but has no replies. I've searched the forums and google every which way I could think of with no results.

    Any ideas?

  2. NateJacobs
    Member
    Posted 7 months ago #

    This function will send an email to the site administrator once a user has updated their profile.

    https://gist.github.com/1286583

    You can easily remove the site administrator's email and use the user's email instead.

  3. Clicknathan
    Member
    Posted 7 months ago #

    Nice, gave it a try and it indeed does work wonderfully.

    Except that changing the email address from the admin's to the user sends an email to the updated address....so if someone changed the address from validuser@mysite.com to malicious@hackertype.com, only the hacker, not the original user, would get the email...

  4. NateJacobs
    Member
    Posted 7 months ago #

    I think you can get the old email address. Let me check on that.

  5. NateJacobs
    Member
    Posted 7 months ago #

    I updated the function to now print out the old and updated email addresses.

    You can access all the old (pre update) field values using the $old_user_data object.

Reply

You must log in to post.

About this Topic