New User Notifications and CiviCRM

Updated

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:

1
2
3
4
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);