How to pull user/author profile data in a plugin?

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));