Fixed JS not working because of removed charts

This commit is contained in:
Hickmeister
2025-01-04 02:41:56 +00:00
parent d204dd2b99
commit 7dd648edbb
5 changed files with 67 additions and 327 deletions

View File

@@ -10,12 +10,14 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$stmt->execute([$username]);
$user = $stmt->fetch();
if ($user && password_verify($password, $user['password'])) {
if ($user && password_verify($password, $user['password']) && !$user['disabled']) {
// Store user ID, username, and role in session
$_SESSION['user_id'] = $user['id'];
$_SESSION['username'] = $user['username'];
$_SESSION['role'] = $user['role']; // Store user role
echo 'success';
} else {
echo 'Invalid login credentials';
}
}
?>
?>