Please have a look at my-functions.php.txt.
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.
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?
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.
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.
All I want is to create a user with these parameters (name, password and email@email.com).
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.
Now you have to use cforms so that the function is called. It is called on successfull submission of one of your defined forms.
Actually you can also read this in my-functions.php.txt. This forum is not a replacement for reading through the documentation.