<commit_before><?php

require_once __DIR__ . '/Model/userMapper.php';
require_once __DIR__ . '/Controller/sessionController.php';
$mapper = new userMapper(); ?>

<body>
<?php
if (SessionController::isLoggedIn()) {
    echo 'loggedIn';
}

if (isset($_POST['email']) && isset($_POST['password'])) {
    $email = $_POST['email'];
    $password = $_POST['password'];
    $user = $mapper->getUser($email, $password);

    if ($user != null) {

        SessionController::set("LoggedIn", true);
        SessionController::set('id', $user->getID());
        echo SessionController::get('id');
        header('Location: /index.php');
    } else {
        echo 'Benutzername/Passwort falsch';
    }
}
?><commit_msg>Update login.php<commit_after><?php

require_once __DIR__ . '/Model/User.php';
require_once __DIR__ . '/Controller/sessionController.php';
$mapper = new User(); ?>

<body>
<?php
if (SessionController::isLoggedIn()) {
    echo 'loggedIn';
}

if (isset($_POST['email']) && isset($_POST['password'])) {
    $email = $_POST['email'];
    $password = $_POST['password'];
    $user = $mapper->getUser($email, $password);

    if ($user != null) {

        SessionController::set("LoggedIn", true);
        SessionController::set('id', $user->getID());
        echo SessionController::get('id');
        header('Location: /index.php');
    } else {
        echo 'Benutzername/Passwort falsch';
    }
}
?>
{'fraction_non_alphanumeric': 0.19885958660014255, 'fraction_numerical': 0.0, 'mean_word_length': 3.8247422680412373, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6364444', 'n_tokens_mistral': 448, 'n_tokens_neox': 447, 'n_words': 83}