<commit_before><?php

/**
 * Siehe Dokumentation im DefaultController.
 */
class UserController
{
    public function login()
    {

      $view = new View('user_login');
      $view->title = 'Login';
      $view->heading = 'Login';
      $view->display();
    }

    public function singin()
    {
      $view = new View('user_singin');
      $view->title = 'Sing In';
      $view->heading = 'Sing In';
      $view->display();
    }

    public function doLogin()
    {
      $userRepository = new UserRepository();
      $loggedIn = false;
      foreach ($userRepository->readAll() as $user) {
        if ($user->email == $_POST['username']){
          if ($user->password == shal($_POST['password'])) {
            $_SESSION['logged_in_user'] = $user->id;
            $loggedIn = true;
          }
        }
      }
    }
}<commit_msg>controller<commit_after><<<<<<< current
<?php

/**
 * Siehe Dokumentation im DefaultController.
 */
class UserController
{
    public function login()
    {

      $view = new View('user_login');
      $view->title = 'Login';
      $view->heading = 'Login';
      $view->display();
    }

    public function singin()
    {
      $view = new View('user_singin');
      $view->title = 'Sing In';
      $view->heading = 'Sing In';
      $view->display();
    }

    public function doLogin()
    {
      $userRepository = new UserRepository();
      $loggedIn = false;
      foreach ($userRepository->readAll() as $user) {
        if ($user->email == $_POST['username']){
          if ($user->password == <PASSWORD>($_POST['password'])) {
            $_SESSION['logged_in_user'] = $user->id;
            $loggedIn = true;
          }
        }
      }
    }
}
=======
<?php

/**
 * Siehe Dokumentation im DefaultController.
 */
class UserController
{
    public function login()
    {

      $view = new View('user_login');
      $view->title = 'Login';
      $view->heading = 'Login';
      $view->display();
    }

    public function singin()
    {
      $view = new View('user_singin');
      $view->title = 'Sing In';
      $view->heading = 'Sing In';
      $view->display();
    }

    public function doLogin()
    {
      $userRepository = new UserRepository();
      $loggedIn = false;
      foreach ($userRepository->readAll() as $user) {
        if ($user->email == $_POST['username']){
          if ($user->password == shal($_POST['password'])) {
            $_SESSION['logged_in_user'] = $user->id;
            $loggedIn = true;
          }
        }
      }
    }
    public function doCreate()
    {
      $password = <PASSWORD>($password);
       $query = "INSERT INTO $this->tableName (firstname, lastname, username, password) VALUES (?, ?, ?, ?)";
       $statement = ConnectionHandler::getConnection()->prepare($query);
       $statement->bind_param('ssss', $firstname, $lastname, $username, $password);

       if (!$statement->execute()) {
           throw new Exception($statement->error);
       }
       return $statement->insert_id;
   }
 }
>>>>>>> before discard
{'fraction_non_alphanumeric': 0.1736111111111111, 'fraction_numerical': 0.0, 'mean_word_length': 2.2667386609071274, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 48, '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': '749816', 'n_tokens_mistral': 915, 'n_tokens_neox': 901, 'n_words': 191}