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.