Fixed JS not working because of removed charts
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
$host = '172.16.18.3';
|
||||
$db = 'TechOdysseyDashboard';
|
||||
$user = 'tod_admin';
|
||||
$pass = '';
|
||||
$pass = 'QprczJwYor./_.T*';
|
||||
|
||||
try {
|
||||
$pdo = new PDO("mysql:host=$host;dbname=$db", $user, $pass);
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user