// Brad's avatar on homepage modification if ($bbuserinfo['userid']) { require_once('./includes/functions_user.php'); // note: the function below will run one query $homepage_ava = fetch_avatar_url($bbuserinfo['userid']); } // end avatar modification