latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Admin Notification of profile changes.

Home Forums Community Forum Admin Notification of profile changes.

This topic contains 3 replies, has 2 voices. Last updated by  Cristián Lávaque 3 years, 6 months ago.

Topic Author Topic
Posted: Tuesday Jun 18th, 2013 at 7:17 pm #52158

Yes, I know there are NUMEROUS requests for this, however, they all one way or another direct to this 2011 thread and it’s not really much help.
http://www.primothemes.com/forums/viewtopic.php?f=4&t=2193&start=25

First of all, if you read through every “Admin Notification…” thread, there are conflicting code suggestions of how to accomplish this.

That being said, none of them work for me, and they also caused some undesired changes in my installation.

  • It causes the Log Out functionality of the website to return the white screen of death.
  • It screws up the formatting of the S2 Member options dashboard
  • Are there any updates in 2013 that can help me get this working?

    Also, it’s been a couple of years that people keep asking for this functionality. Any chance of actually making it a useful function of the plug in?

    Any help here is appreciated.
    Thanks.

    List Of Topic Replies

    Viewing 3 replies - 1 through 3 (of 3 total)
    Author Replies
    Author Replies
    Posted: Wednesday Jun 19th, 2013 at 7:19 am #52204
    Posted: Thursday Jun 20th, 2013 at 2:31 pm #52298

    Nope. No help.

    I think part of the problem here is that you keep referring people to things that they can only understand if they are PHP developers. Honestly, if we were PHP developers, we could have written our own plug in. We wouldn’t have to pay for one.

    When you just direct people to a block of code with no explanation, rhyme or reason whether it’s the actual code to use, just a sample, or theory…with no notes if something needs to be changed and no direction on where or what…it’s frustrating. And consequently you keep answering the same question over and over again because people aren’t getting it. We understand some coding is involved when you want special functions. But a little help for people who don’t spend everyday writing PHP code would be well received.

    So, not being a PHP developer, the only hope others like me have is to copy and paste what you have given and hope.

    So, let me see if I can help you, help me.
    Here’s the code that you directed me to. Is there anything I need to add to this (besides my email) ? Am I supposed to replace parts of the other code with it? Because by itself it doesn’t do anything.

    add_action ('show_user_profile', 'email_profile_changes');
    add_action ('edit_user_profile', 'email_profile_changes');
    function email_profile_changes($user_id) {
    	if (isset($_GET['updated'])) {
    		$user = new WP_User($user_id);
    		wp_mail ('support@nhab.it', 'Profile update - ' . $user->user_login, 'testing1');
    	}
    }

    And here is the other code from the other forum thread that I was directed to.

    <?php
        add_action ('ws_plugin__s2member_during_handle_profile_modifications', 'email_profile_changes');
    
        function email_profile_changes($vars = array())
        {
            $user = new WP_User($vars['user_id']);
    
            wp_mail ('support@codespoke.com', 'Profile update - ' . $user->user_login. '
                First Name: ' . $user->first_name ['First Name'] . '
                Last Name: ' . $user->last_name['Last Name'] . '
                Email: ' . $user->email ['user_email'] . '
                Newsletter Preference: ' . $user->ws_plugin__s2member_custom_reg_field_newsletter['']. '
                Phone Number: ' . $user->ws_plug_s2member_custom_reg_field_phone_number ['phone_number']. '
                Type of Phone: '. $user->ws_plug_s2member_custom_reg_field_type_of_phone ['phone_type'].'
     Please check against your records...');
        }
        ?>

    So where are we going wrong here? What do I need to do to get an admin email when someone makes a change to their profile, and alert the admin of what changed?

    Thank you in advance for your help here.

    Posted: Saturday Jun 22nd, 2013 at 6:01 pm #52393

    I just searched for a plugin that notifies on profile update, and found this: http://wordpress.org/plugins/user-profile-change-email/

    Maybe you won’t need to create a hack after all.

    I hope that helps. :)

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

    This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

    Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

    Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.