[wp-hackers] Updating a User Record via PHP?

Matt Martz mdmartz at sivel.net
Mon Feb 2 18:09:17 GMT 2009

On Mon, Feb 2, 2009 at 12:59 PM, Mike Schinkel
<mikeschinkel at newclarity.net> wrote:
> Hi all:
> I'm running into trouble using wp_update_user() where it is adding new users instead of simply updating them. When I trace it I find that it calls wp_insert_user(). Does anyone here know anything about this? Does anyone know how to ensure that a request to update a user actually updates instead of inserting a duplicate (w/o simply reverting to SQL?)
> -Mike Schinkel
> http://mikeschinkel.com/

It shouldn't be adding a new user as long as you pass a proper
$userdata array to it.

According to the docs: "uses wp_insert_user() Used to update existing
user or add new one if user doesn't exist already"

Matt Martz
matt at sivel.net

More information about the wp-hackers mailing list