I use the function wp_insert_user() to update user's settings, but I can't get it to work.
Here is my code :
include '../wordpress-mu/wp-blog-header.php'; include '../wordpress-mu/wp-includes/registration.php'; $first_name = htmlentities($_POST['first_name']); $last_name = htmlentities($_POST['last_name']); $user_email = htmlentities($_POST['user_email']); $userdata_new = array(); $userdata_new['user_pass'] = $current_user->user_pass; $userdata_new['user_login'] = $current_user->user_login; if (!empty($first_name)) $userdata_new['first_name'] = $first_name; if (!empty($last_name)) $userdata_new['last_name'] = $last_name; if (!empty($user_email)) $userdata_new['user_email'] = $user_email; wp_insert_user($userdata_new);
I don't really see why it's not working, I send it an array as it's required, here is an example of my array $userdata_new :
Array ( [user_pass] => $P$BSOfnh.OWENyzvWb1nxIGIXRn0WM7W/ [user_login] => admin [user_email] => email@example.com )
Thanks a lot for your help,