2 added 163 characters in body
source | link

If you're trying to get user data for the displayed profile, you can do it like so:

$thisauthor = get_userdata(intval($author));

That'll return an object filled with everything you need. For instance, if you need the user ID, you can call it like so:

$thisauthor->ID

I use this extensively on the profiles on my site: http://androidandme.com/user/clark

UPDATE

In a plugin, it looks like you need to call the global variable first, like so:

global $author; $thisauthor = get_userdata(intval($author));

If you're trying to get user data for the displayed profile, you can do it like so:

$thisauthor = get_userdata(intval($author));

That'll return an object filled with everything you need. For instance, if you need the user ID, you can call it like so:

$thisauthor->ID

I use this extensively on the profiles on my site: http://androidandme.com/user/clark

If you're trying to get user data for the displayed profile, you can do it like so:

$thisauthor = get_userdata(intval($author));

That'll return an object filled with everything you need. For instance, if you need the user ID, you can call it like so:

$thisauthor->ID

I use this extensively on the profiles on my site: http://androidandme.com/user/clark

UPDATE

In a plugin, it looks like you need to call the global variable first, like so:

global $author; $thisauthor = get_userdata(intval($author));

1
source | link

If you're trying to get user data for the displayed profile, you can do it like so:

$thisauthor = get_userdata(intval($author));

That'll return an object filled with everything you need. For instance, if you need the user ID, you can call it like so:

$thisauthor->ID

I use this extensively on the profiles on my site: http://androidandme.com/user/clark