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.

User Profile Change Admin Notification

Home Forums Community Forum User Profile Change Admin Notification

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

Topic Author Topic
Posted: Monday Mar 12th, 2012 at 4:55 pm #7922

Any ideas on how to have an e-mail notification sent to the site administrator whenever a member makes changes to his/her profile information? My client needs to be notified of address, phone number, and e-mail changes in order to keep the master database updated. This master database contains users not online, so simply exporting the database from s2member will not work.

We are using s2member Pro integrated with BuddyPress profiles. I have custom fields in s2Member Pro’s registration with PayPal Pro Forms. These custom fields are displayed in the BuddyPress profiles and member directory.

List Of Topic Replies

Viewing 7 replies - 1 through 7 (of 7 total)
Author Replies
Author Replies
Posted: Tuesday Mar 13th, 2012 at 6:18 am #7967

Hi Rick.

This hack may assist you do what you want:
http://www.primothemes.com/forums/viewtopic.php?f=4&t=2193#p7827

I hope it helps :)

Posted: Tuesday Mar 13th, 2012 at 10:17 am #7994

Thanks so much Cristián for directing me to the right place; my apologies for asking a question already in the forums. :) I’ll hope that hack does the trick!

Posted: Tuesday Mar 13th, 2012 at 4:22 pm #8049

No problem! Let us know how it goes. :)

Posted: Friday Mar 16th, 2012 at 3:10 pm #8397

Not sure if I’m missing something, but the solution provided on the other forum doesn’t seem to be working for me.

I already had an s2hacks.php file inside the mu-plugins directory, since I previously add a hack to set a default EOT date. Below the code already in my s2hacks file, I did a copy-paste of Jason’s original solution from the other topic, changing only the function name (to “profile-change_notify”) and my e-mail address.

I have tested by changing a user’s address through the Buddypress profile edit page, and I’ve had no luck receiving any e-mails to notify me of the change.

Below is the full content of my s2hacks.php file (changed my e-mail back to generic):

<?php
add_action ('ws_plugin__s2member_during_configure_user_registration', 's2_set_default_eot_time');
function s2_set_default_eot_time($vars = array()) {
    if (!is_admin() && $vars['processed'] === 'yes') {
        update_user_option($vars['user_id'], 's2member_auto_eot_time', strtotime(date('Y') . '-12-31'));
    }
}
?>

<?php
add_action ("ws_plugin__s2member_during_handle_profile_modifications", "profile_change_notify");
function profile_change_notify ($vars = array ())
    {
        $user = new WP_User ($vars["user_id"]);
        wp_mail ("myname@mydomain.com", "Subject ( " . $user->user_login . " just updated their Profile )", "Message Body goes here.");
    }
?>

Any ideas?

Posted: Friday Mar 16th, 2012 at 4:07 pm #8406

I see you went out of PHP and then back again after a couple of new lines. That shouldn’t be in that file.

Also, there’s a similar hook for the BuddyPress integration.

Try this:

[hilite pre_code]
user_login . ' just updated the Profile )', 'Message Body goes here.');
}
?>
[/hilite]
Posted: Friday Mar 16th, 2012 at 4:55 pm #8419

Works! Now I’ll just have to try with the modifications to show profile information in the body of the e-mail. If not, this will have to do the job.
Thanks so much–s2member’s tech support has been great. I’ll be giving a good rating in WP plugins. :)

Posted: Friday Mar 16th, 2012 at 5:02 pm #8421

Glad it works! And thanks for the kudos and support! Very appreciated. :)

Viewing 7 replies - 1 through 7 (of 7 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.