Strangely enough I was not able to make this similar code to work.
global $wpdb;
$buyer_id = $row->uid; //echoed 3
$u = get_user_by('id',$buyer_id);
echo 'u:'.$u->email;
WP User object is not generated at all.
After reading codex, using public example, reading pluggable.php,
I decided to post it here.
WP is 3.4.1
any clues?