add teams to teams table and fix for login

This commit is contained in:
2022-06-09 17:18:35 +02:00
parent af4207f66e
commit 80a03ec557
5 changed files with 85 additions and 5 deletions

View File

@@ -9,14 +9,19 @@
if(!empty($user_name) && !empty($password)) {
$user_data = get_user_data_name($con, $user_name);
$phash = generate_password_hash($password, $user_data['salt']);
if($user_data['password'] === $phash) {
$_SESSION['user_id'] = $user_data['user_id'];
header("Location: index.php");
die;
if($user_data) {
$phash = generate_password_hash($password, $user_data['salt']);
if($user_data['password'] === $phash) {
$_SESSION['user_id'] = $user_data['user_id'];
header("Location: index.php");
die;
} else {
echo "Benutzername oder Passwort stimmen nicht";
}
} else {
echo "Benutzername oder Passwort stimmen nicht";
}
} else {
echo "Gib bitte gültige Daten ein!";
}