custom notification for user profile changes
-
I have followed the instructions here:
https://www.primothemes.com/forums/viewtopic.php?f=4&t=2193&sid=dfef67f44c811ad0a6cc3d4160969590&start=25and here:
https://www.s2member.com/forums/topic/user-profile-change-admin-notification/using this code:
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')); } } add_action ('ws_plugin__s2member_during_handle_profile_modifications', 'profile_change_notify'); add_action ('ws_plugin__s2member_during_handle_profile_modifications_4bp', 'profile_change_notify'); function profile_change_notify ($vars = array ()) { $user = new WP_User ($vars['user_id']); wp_mail ('myemail@me.com', 'Subject ( ' . $user->user_login . ' just updated the Profile )', ' User Name: ' . $user->user_login . ' Email: ' . $user->user_email . ' First Name: ' . $user->first_name . ' Last Name: ' . $user->last_name . ' Street Address: ' . $user->wp_s2member_custom_fields['street_address'] . ' Ingredients: ' . $user->wp_s2member_custom_fields["ingredients"] . ' Day of Week 1: ' . $user->wp_s2member_custom_fields["day_of_week_1"] . ' Day of Week 2: ' . $user->wp_s2member_custom_fields["day_of_week_2"] . ' Day of Week 3: ' . $user->wp_s2member_custom_fields["day_of_week_3"]'); }
wrapped in php tags inside of a plugin file. When I receive the email, all fields are good except for the ingredients field, which just comes back as “array” How can I display the contents of that array in the email rather than just the text “array”? The field is a check boxes, multi option field if that helps.
- The topic ‘custom notification for user profile changes’ is closed to new replies.