Update file user.php

This commit is contained in:
Jan BELLON 2024-03-11 20:49:27 +00:00
parent 64ba00c0b2
commit 86a5817330

View File

@ -2,12 +2,6 @@
require "../include/variables.php"; require "../include/variables.php";
require "../include/functions.php"; require "../include/functions.php";
if(isset($_SESSION['userid']) == false) {
header("Location: index.php");
http_response_code(404);
die();
}
$bdd = connect($dbhost, $dbname, $dbuser, $dbpass); $bdd = connect($dbhost, $dbname, $dbuser, $dbpass);
$username = isset($_GET['user']) ? htmlspecialchars($_GET['user']) : ""; $username = isset($_GET['user']) ? htmlspecialchars($_GET['user']) : "";
$req = $bdd->prepare("SELECT ID, username, creation_date, display_name, role, profile_picture, banner, bio FROM users WHERE username = :username ORDER BY date DESC"); $req = $bdd->prepare("SELECT ID, username, creation_date, display_name, role, profile_picture, banner, bio FROM users WHERE username = :username ORDER BY date DESC");