This is my first adventure with wordpress.
Can you give me some sample code of such a thing?
Now I know how to add new user in other way - not by the values of my registration form.
I wrote simple so far plugin.
<php
require_once(ABSPATH . WPINC . '/registration.php');
add_action("gform_pre_submission", "pre_submission_handler");
function pre_submission_handler($form_meta){
$userdata = array(
'user_login' => 'login',
'user_email' => 'email@o2.pl',
'user_pass' => 'pass',
'description' => var_export($form_meta, true)
);
wp_insert_user($userdata);
//wp_create_user('username', 'password', $form_meta);
}
?>
Posted 13 years ago on Wednesday September 29, 2010 |
Permalink