No need for the two functions/hooks – just use the first, with the addition of:
if ( $post_id = wp_insert_post( $user_page ) ) {
wp_update_post(
array(
'ID' => $post_id,
'post_name' => $post_id,
)
);
}