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

Mike Schinkel mikeschinkel at newclarity.net
Mon Feb 2 19:58:36 GMT 2009


Nice, thanks. 

BTW, do you know if the use of object vs. arrays was by design, or is it just because of legacy issues?

-Mike Schinkel

P.S. I'm starting to wonder if I will ever learn all that is encompassed by the PHP standard library. :-)

----- Original Message -----
From: "Matt Martz" <mdmartz at sivel.net>
To: wp-hackers at lists.automattic.com
Sent: Monday, February 2, 2009 2:19:54 PM GMT -05:00 US/Canada Eastern
Subject: Re: [wp-hackers] Updating a User Record via PHP?

> 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
wp-hackers mailing list
wp-hackers at lists.automattic.com

More information about the wp-hackers mailing list