this function looks like this:
# ------------------------------------------------------------------
# sfc_get_profile_data(userid)
#
# Grabs all of the profile data for specified user and
# returns in an array
# ------------------------------------------------------------------
function sfc_get_profile_data($userid)
{
global $wpdb;
if ($userid == 0 || $userid == '') return;
$profile=array();
# from USERS
$profile = $wpdb->get_row("SELECT ID, user_login, user_email, user_url, user_registered FROM ".SFUSERS." WHERE ID=".$userid, ARRAY_A);
if(empty($profile)) return;
# from USERMETA
$m = $wpdb->get_results("SELECT meta_key, meta_value FROM ".SFUSERMETA." WHERE user_id=".$userid, ARRAY_A);
if (empty($m)) return;
foreach ($m as $item)
{
$profile[$item['meta_key']]=$item['meta_value'];
}
# from SFMEMBERS
$m = $wpdb->get_row("SELECT * FROM ".SFMEMBERS." WHERE user_id=".$userid, ARRAY_A);
if (!empty($m))
{
$profile = array_merge($profile, $m);
}
if (isset($profile['avatar'])) $profile['avatar'] = unserialize($profile['avatar']);
if (isset($profile['photos'])) $profile['photos'] = unserialize($profile['photos']);
if (isset($profile['user_options'])) $profile['user_options'] = unserialize($profile['user_options']);
return $profile;
}