Have a plugin that I manage where I have been using wp_update_user to both create new users and update existing users. I’ve had a couple of users inform me that my plugin is failing at the point where it should be creating a new user via wp_update_user. If I have them change it to wp_insert_user then it functions just fine. In looking at registration.php it appears that the ONLY advantage of using wp_update_user is if you are updating a user’s password.
Is this assumption correct? If so, can anyone think of a reason I shouldnt go ahead and switch to using wp_insert_user?
Also, can anyone think of a reason that wp_update_user would fail but wp_insert_user wouldnt when the array of user data passed to both of them is identical?
- The topic ‘wp_update_user vs wp_insert_user’ is closed to new replies.