New User Notifications and CiviCRM

In order to trigger the ‘New User Registration – For User’ notifications when inserting users directly using the CiviCRM WordPress Profile Sync plugin, use the following code:

function bnfw_trigger_user_notification($civi_contact, $user_id) {
wp_new_user_notification( $user_id, null, 'both' );
add_action('civi_wp_member_sync_after_insert_user', 'bnfw_trigger_user_notification', 10, 2);

Subscribe for BNFW News

Want to know when new add-ons or features are released? Sign up to the newsletter. No spam, ever. Unsubscribe at any time.

Please enter your name.
Please enter a valid email address.
Something went wrong. Please check your entries and try again.