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

Matt Martz mdmartz at sivel.net
Mon Feb 2 19:19:54 GMT 2009

> Aye, there's the rub, eh?  Getting a proper $userdata seems to be the issue.
> Did you guys know that core sometimes expects $userdata to be an array and sometimes it expects it to be an object?  Hard to write/debug code that interacts with it given that inconsistency.

get_object_vars (http://us.php.net/get_object_vars) is being use in
wp-admin/includes/user.php on line 164

wp_update_user( get_object_vars( $user ))

Matt Martz
matt at sivel.net

More information about the wp-hackers mailing list