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

This commit is contained in:
FractalParadigm 2025-03-11 19:34:05 -04:00
parent 490afb3a4f
commit c7770a6f19

View File

@ -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"];