station account are redirect to their station table after login

This commit is contained in:
2022-06-21 22:44:12 +02:00
parent 16e205232a
commit b0478a7dd4

View File

@@ -14,7 +14,11 @@
if($user_data['password'] === $phash) { if($user_data['password'] === $phash) {
$_SESSION['user_id'] = $user_data['user_id']; $_SESSION['user_id'] = $user_data['user_id'];
$_SESSION['user_group'] = $user_data['user_group']; $_SESSION['user_group'] = $user_data['user_group'];
header("Location: index.php"); if ($_SESSION['user_group'] != 'station') {
header("Location: index.php");
} else {
header("Location: statistik.php");
}
die; die;
} else { } else {
echo "Benutzername oder Passwort stimmen nicht"; echo "Benutzername oder Passwort stimmen nicht";