edit_user_created_user hook – using to update Groups

The GravityForms folks chimed in. To clarify, I wanted to add a row to a database table on user activation (not on form submit), and I had not found that hook. Here is the completed code…

add_action( 'gform_user_registered', 'hl_add_group', 10, 4 );

function hl_add_group($user_id, $feed, $entry) {

    $group = $entry[8];

    global $wpdb;

    // add form data to custom database table
    $wpdb->insert(
        'wp_groups_user_group',
        array(
          'user_id' => $user_id,
          'group_id' => $group,
        ),
        array(
            '%d',
            '%d'
        )
    );
}