From c7770a6f19a31f0a9f69160219779d549edb03da Mon Sep 17 00:00:00 2001 From: FractalParadigm Date: Tue, 11 Mar 2025 19:34:05 -0400 Subject: [PATCH] Slight change to login system so that the SESSION variable with the username catches the same one the person signed up for, so when they're looking at their own account the link will be correct --- user/login.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user/login.php b/user/login.php index 8b7f236..6f72efa 100644 --- a/user/login.php +++ b/user/login.php @@ -31,7 +31,7 @@ session_start(); $password = $_POST["password"]; // Get SQL data - $sqlGetData = $conn->prepare("SELECT userID,password,privileges FROM " . $userTableName . " WHERE username=\"" . $username . "\""); + $sqlGetData = $conn->prepare("SELECT username,userID,password,privileges FROM " . $userTableName . " WHERE username=\"" . $username . "\""); $sqlGetData->execute(); @@ -43,6 +43,7 @@ session_start(); $result = $sqlGetData->fetch(PDO::FETCH_ASSOC); // Grab the hash from the fetched SQL data +$username = $result["username"]; $passwordHash = $result["password"]; $userID = $result["userID"]; $privileges = $result["privileges"];