Title: Create user with data from cforms2
Last modified: August 31, 2016

---

# Create user with data from cforms2

 *  Resolved [actualiza](https://wordpress.org/support/users/actualiza/)
 * (@actualiza)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/create-user-with-data-from-cforms2/)
 * Hi,
    I am using version 14.11.2 of cforms2. I need to retrieve the form data (
   email, password and user) from the form and create a wordpress user. I´ve read
   that I need to change the function ‘my_cforms_ajax_filter’ from ‘my_functions.
   php’ file, but this file doesnt exist in the latest version of Cforms.
 * [https://wordpress.org/plugins/cforms2/](https://wordpress.org/plugins/cforms2/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [bgermann](https://wordpress.org/support/users/bgermann/)
 * (@bgermann)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/create-user-with-data-from-cforms2/#post-7107108)
 * Please have a look at my-functions.php.txt.
 *  Thread Starter [actualiza](https://wordpress.org/support/users/actualiza/)
 * (@actualiza)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/create-user-with-data-from-cforms2/#post-7107161)
 * I tried adding the wordpress function ‘wp_create_user’ in the function ‘my_cforms_ajax_filter’
   of my-functions.php.txt but is not working.
 * I also add in the add_action ‘cforms2_after_processing_action’ but nothing.
 *  Plugin Author [bgermann](https://wordpress.org/support/users/bgermann/)
 * (@bgermann)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/create-user-with-data-from-cforms2/#post-7107169)
 * Okay. Can you paste the exact code here (use code markup)? Did you just edit 
   the txt file or did you remove .txt etension and enable the plugin?
 *  Thread Starter [actualiza](https://wordpress.org/support/users/actualiza/)
 * (@actualiza)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/create-user-with-data-from-cforms2/#post-7107177)
 * I’m just editing the txt file.
    I only add the wp_create_user function: function
   my_cforms_ajax_filter($formID) { ### See my_cforms_filter wp_create_user(“name”,“
   password”, “email@email.com” ); }
 * I also tried adding the same function in the add_action function.
 *  Plugin Author [bgermann](https://wordpress.org/support/users/bgermann/)
 * (@bgermann)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/create-user-with-data-from-cforms2/#post-7107182)
 * Okay. You do not know how to use a PHP function, do you? If you read through 
   the file there are steps to take to make it being recognized by the PHP interpreter(
   look for “TO USE THE FUNCTIONS”). The way you are using wp_create_user now means
   that a user “name” is created with password “password” and email “email@email.
   com”. You would have to exchange the parameters by something from your form. 
   You can see it in the example how to get the posted information.
 *  Thread Starter [actualiza](https://wordpress.org/support/users/actualiza/)
 * (@actualiza)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/create-user-with-data-from-cforms2/#post-7107190)
 * All I want is to create a user with these parameters (name, password and [email@email.com](https://wordpress.org/support/topic/create-user-with-data-from-cforms2/email@email.com?output_format=md)).
   
   I rename the file to ‘my-functions.php’ and the plugin is activated. I include
   the function wp_create_user to my_cforms_ajax_filter but the user is not created
   in wordpress.
 *  Plugin Author [bgermann](https://wordpress.org/support/users/bgermann/)
 * (@bgermann)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/create-user-with-data-from-cforms2/#post-7107191)
 * Now you have to use cforms so that the function is called. It is called on successfull
   submission of one of your defined forms.
 *  Plugin Author [bgermann](https://wordpress.org/support/users/bgermann/)
 * (@bgermann)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/create-user-with-data-from-cforms2/#post-7107192)
 * Actually you can also read this in my-functions.php.txt. This forum is not a 
   replacement for reading through the documentation.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Create user with data from cforms2’ is closed to new replies.

 * ![](https://ps.w.org/cforms2/assets/icon-128x128.png?rev=1010031)
 * [cformsII](https://wordpress.org/plugins/cforms2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cforms2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cforms2/)
 * [Active Topics](https://wordpress.org/support/plugin/cforms2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cforms2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cforms2/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [bgermann](https://wordpress.org/support/users/bgermann/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/create-user-with-data-from-cforms2/#post-7107192)
 * Status: resolved