add teams to teams table and fix for login
This commit is contained in:
@@ -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!";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user