/**
 *
 * User Profiles - steamify_user_profile
 * - - - - - - - - - - - - - - -
 * @desc Adds information relating to Steam to the user profile if the account is linked.
 * @since 1.5
 * @version 1.5
 *
 */
function steamify_user_profile()
{
    global $db, $mybb, $steamid_32, $steamid_64, $steamrep_link, $steam_level, $steam_status, $steam_verified, $steamlogin_profile_block, $templates, $theme;
    require_once MYBB_ROOT . 'inc/class_steam.php';
    $steam = new steam();
    // Get the ID of the user being viewed.
    $uid = $mybb->input['uid'];
    // Get the possible Steam ID of the user.
    $user_details = $db->fetch_array($db->simple_select("users", "loginname", "uid = '{$uid}'"));
    $steam_verified = 'No';
    $steamid_64 = 'N/A';
    $steamid_32 = 'N/A';
    $steamrep_link = 'N/A';
    $steam_level = '?';
    $steam_status = 'N/A';
    // Check to see if loginname is empty, and make sure it's numeric.
    if ($user_details['loginname'] != null and is_numeric($user_details['loginname'])) {
        // Get our ID variables.
        $steamid_64 = $user_details['loginname'];
        $steamid_32 = $steam->convert64to32($steamid_64);
        // Get the level on the Steam profile.
        $steam_level = $steam->get_steam_level($steamid_64);
        $steam_verified = 'Yes';
        // Create a link for SteamRep.
        $steamrep_link = '<a href="http://www.steamrep.com/profiles/' . $steamid_64 . '" target="_blank">http://www.steamrep.com/profiles/' . $steamid_64 . '</a>';
        // Get our steam status
        $steam_status = '<a href="http://www.steamcommunity.com/profiles/' . $steamid_64 . '" target="_blank"><img src="http://steamsignature.com/status/english/' . $steamid_64 . '.png" /></a><a href="steam://friends/add/' . $steamid_64 . '"><img src="http://steamsignature.com/AddFriend.png"></a>';
        eval("\$steamlogin_profile_block = \"" . $templates->get("steamlogin_profile_block") . "\";");
    }
    // close if($user_details['loginname'] != null and is_numeric($user_details['loginname']))
}