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 on user profile change

Home Forums Community Forum Admin notification on user profile change

This topic contains 2 replies, has 2 voices. Last updated by  Debbie Campbell 3 years, 7 months ago.

Topic Author Topic
Posted: Tuesday May 28th, 2013 at 7:37 pm #50772

I tried adding this to functions.php based on something I saw in a 2012 post:

add_action ('ws_plugin__s2member_during_handle_profile_modifications', 'profile_change_notify');
function profile_change_notify($vars = array())
{
	wp_mail('address@email.com', 'User ' . $vars['user_id'] . ' updated his profile', 'Message Body goes here.');
}

But it’s not working. I do get other WP notifications just fine at the same address I used in the function. Please help?

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Wednesday May 29th, 2013 at 8:49 am #50828
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

That code looks like it wasn’t meant to be used out-of-box and may have an issue. I can tell you that ws_plugin__s2member_during_handle_profile_modifications is the correct hook to use here.

See: Knowledge Base » Hacking s2Member® Via Hooks/Filters

I would take a look at how the wp_mail() function is being used.

See: http://codex.wordpress.org/Function_Reference/wp_mail

That’s about as far as we can go with custom code. If you need further assistance, we recommend http://jobs.wordpress.net, or another freelance web site where WordPress® experts are offering their expertise through a bid on your project.
Posted: Wednesday May 29th, 2013 at 9:49 am #50834

I found a non-s2Member function that works fine, thanks.

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