This support ticket is created Il y a 8 années et 4 mois. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hello. Thank you for contacting the Toolset support.
1) I have a short question, Is it possible to create WordPress users with CRED (and or Access)?
=> Yes, you can able to create WordPress user using CRED.
To create WordPress user on fly you can use wp_create_user when user submit the CRED form. You can catch the submit action of CRED form using "cred_save_data" hook.
=>https://toolset.com/documentation/user-guides/cred-api/
add_action('cred_save_data', 'creation_client',10,2);
function creation_client($post_id, $form_data)
{
// if a specific form
if ($form_data['id']==1290)
{
if (isset($_POST['identifiant']))
{
$password = wp_generate_password( 10, true, false );
$userData = array(
'user_login' => $login,
'first_name' => $fname,
'last_name' => $lname,
'user_pass' => $password,
'user_email' => $_POST['email'],
'role' => 'Your-Role'
);
wp_insert_user( $userData );
}
}
}
2) Second question: Is it possible to export results from CRED forms to .csv?
It is possible but you will require custom code. For your custom code requirement you may contact our certified partners:
=> https://toolset.com/consultant/
Ohh, yes, you are right. I thought you want to insert user using your custom CRED form.
Do I need to create a Custom Post for the Users? Or will they be added to the common users?
=> Its by default applied to the default users, no need to create new CPT for Users.
May I kindly ask you please to open a new ticket for your each new question? This will also help other users with similar problems find solutions when searching the forum.