From af5e01fc02f00f6ea4ecfc5f40db95e91257857a Mon Sep 17 00:00:00 2001 From: Mario <100047175+Mariopizza1@users.noreply.github.com> Date: Mon, 22 May 2023 13:20:52 +0300 Subject: [PATCH] Update headshot.php --- assets/renders/user/headshot.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/renders/user/headshot.php b/assets/renders/user/headshot.php index 9453f99..b561289 100644 --- a/assets/renders/user/headshot.php +++ b/assets/renders/user/headshot.php @@ -1,16 +1,17 @@ prepare("SELECT * FROM users WHERE id = :id"); +$id = (int)$_GET["userId"] ?? 1; // get the id!! if its no id then 1 +$stmt = $con->prepare("SELECT * FROM users WHERE id = :id"); // get everythin from users where the id is the id $stmt->bindParam(':id',$id,PDO::PARAM_INT); $stmt->execute(); $ruser = $stmt->fetch(); if(!$ruser) { exit; } -function renderUser($id, $times = 1) { +function renderUser($id, $times = 1) { // render function noice global $RCCServiceSoap; global $site; // times is the like, if you rendered 2 times or shit. @@ -51,3 +52,4 @@ if(empty($ruser["headshot"])) { } else { echo base64_decode($ruser["headshot"]); } +?>