<commit_before><?php
/////////////////FROM THE OTHER USERPAGE/////////////////
require "../assets/includes/connect.php";
require "../assets/includes/validate.php";

error_reporting(0);

if (is_numeric($_GET['id'])) {
    $id = $_GET['id'];
} else {
    try {
        $id = forumQuery("SELECT * FROM `$forum_member_table` WHERE `username`=?", array($_GET['id']))[0]['memberId'];
    } catch (Exception $e) {
        echo "Test1";
        include '../404.php';
        die();
    }
}

$user = getUserInfo(intval($id));
if (!isset($user['userid'])) {
    echo "Test2";
    include '../404.php';
    die();
} else {
    $user_exist = true;
    $username = $user['username'];
}

//          Let's not have people viewing potentially dangerous suspended profiles
// we don't want to have a system to delete users because we should accept appeals
// no matter how big the offence was. Suspending a user is basically deleting them
if ($user['usertype'] == "suspended" && !$is_admin) {
    echo "Test3";
    include '../404.php';
    die();
}

// check if avatar exists
// TODO: make this less hacky, maybe add a default avatar on account creation
$user['avatar'] = "http://opensprites.org/forums/uploads/avatars/" . $user['userid'] . ".png?_=" . time();<commit_msg>More debug testing<commit_after><?php
/////////////////FROM THE OTHER USERPAGE/////////////////
require "../assets/includes/connect.php";
require "../assets/includes/validate.php";

error_reporting(0);

if (is_numeric($_GET['id'])) {
    $id = $_GET['id'];
} else {
    try {
        $id = forumQuery("SELECT * FROM `$forum_member_table` WHERE `username`=?", array($_GET['id']))[0]['memberId'];
    } catch (Exception $e) {
        echo "Test1";
        //include '../404.php';
        die();
    }
}

$user = getUserInfo(intval($id));
if (!isset($user['userid'])) {
    echo "Test2";
    //include '../404.php';
    die();
} else {
    $user_exist = true;
    $username = $user['username'];
}

//          Let's not have people viewing potentially dangerous suspended profiles
// we don't want to have a system to delete users because we should accept appeals
// no matter how big the offence was. Suspending a user is basically deleting them
if ($user['usertype'] == "suspended" && !$is_admin) {
    echo "Test3";
    //include '../404.php';
    die();
}

// check if avatar exists
// TODO: make this less hacky, maybe add a default avatar on account creation
$user['avatar'] = "http://opensprites.org/forums/uploads/avatars/" . $user['userid'] . ".png?_=" . time();
{'fraction_non_alphanumeric': 0.20277227722772279, 'fraction_numerical': 0.011089108910891089, 'mean_word_length': 2.916279069767442, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1986120', 'n_tokens_mistral': 796, 'n_tokens_neox': 759, 'n_words': 229}