WordPress doesn't really offer anything to delete a Profile yourself within a site.
It usually is done by an Admin by deleting the user itself.
Toolset Forms offer nothin to delete Users, although there has been some work on this feature in past, and eventually we will come back to it, but for now there is no ETA or confirmation about it.
What you can do, is use Forms where you edit an user, and bind an action to it with the Toolset Forms API.
Let's say you want a Delete Button where either logged in user with access to that page/list can delete the user which the button applies to.
You could create the classic List of Users which you use already to display Users Edit Forms or links.
Just, this time you use a new Edit User Form.
That Form has no fields, but the Submit Button which says "delete me".
Then, with PHP you create a code that deletes the user which you can grab from the Toolset Form, using the WordPress Codex:
wp_delete_user()
https://codex.wordpress.org/Function_Reference/wp_delete_user
Note that content might need to get reassigned.
This code, you can fire it when you click on "Delete me" (submit the actual Edit user form).
This is done by firing your custom code in the cred_save_data() hook explained here:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
$post_id in this case will be the User ID.
A simple example that explains the logic and structure, but needs to be adapted and tested before you apply it:
add_action('cred_save_data', 'my_save_data_action',10,2);
function my_save_data_action($post_id, $form_data)
{
// if a specific form
if ($form_data['id']==12) //only happens on specific form
{
$reassign = '1';//This is the first user created, usually admin
wp_delete_user( $post_id, $reassign );
}
}
Make sure to redirect the form on submit to some other page, as the form cannot display anymore after you delete the User.