Add Database structure

This commit is contained in:
root committed 2026-10-05 10:52:31 +02:00
1 parent f5f42b73ee
commit 3ad5f5bdd6
4 files changed
+19 -4

No files matched your search

Regular → Executable
+2 -2
View File
@@ -28,14 +28,14 @@ $hash = hash("sha256", $password);
$command = "SELECT username, password FROM users WHERE username = :username AND password = :password";
$args = [
":username" => $username,
":password" => $password
":password" => $hash
];
// Execute SQL Command
$result = $api->dbCommand($command, true, true, $args);
// Check Result
if ($result) {
if ($result && password_verify($password, $result["password"])) {
// Login successful. Generate Auth Token
$token = $api->generateToken($username);