[wp-trac] [WordPress Trac] #18551: get_userdata returning full user object, not data like it used to
WordPress Trac
wp-trac at lists.automattic.com
Sat Sep 3 12:37:43 UTC 2011
#18551: get_userdata returning full user object, not data like it used to
-------------------------------+------------------
Reporter: anmari | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.3
Component: Users | Version: 3.3
Severity: major | Resolution:
Keywords: reporter-feedback |
-------------------------------+------------------
Comment (by anmari):
Hi re problem:
just that in nightly build if one calls get_userdata one gets a
userobject, with amongst other bits $user->data.
$user->data is what used to be returned directly in 3.2.1 if one called
get_userdata.
So I have added a little wrapping function so that my code will work in
both 3.2.1 and in nightly build.
{{{
function amr_get_userdata($id){
$data = get_userdata($id);
if (!empty($data->data)) return($data->data);
else return ($data);
};
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18551#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list