<commit_before><?php

function verifyLogin($db) {
  if (empty($_POST['email'])) {
    if (empty(getCurrentUri()[1])) {
      showLogin();
    }
    else {
      $query1 = mysqli_query($db, "SELECT * FROM ps_user WHERE token='".getCurrentUri()[1]."'");
      if (mysqli_num_rows($query1) == 1) {
        $query2 = mysqli_fetch_array($query1);
        $_SESSION['ps_id'] = $query2['id'];
        $query3 = mysqli_query($db, "UPDATE ps_user SET token=NULL WHERE id='".$query2['id']."'");
        header("Location: ../");
      }
      else {
        echo "<h1>Error: Invalid SSO Token</h1>";
      }
    }
  }
  else {
    $query1 = mysqli_query($db, "SELECT * FROM ps_user WHERE email='".$_POST['email']."'");
    if (mysqli_num_rows($query1) == 1) {
      $str = generateRandomString();<commit_msg>Update verifyLogin.php<commit_after><?php

function verifyLogin($db) {
  if (empty($_POST['email'])) {
    if (empty(getCurrentUri()[1])) {
      showLogin();
    }
    else {
      $query1 = mysqli_query($db, "SELECT * FROM ps_user WHERE token='".getCurrentUri()[1]."'");
      if (mysqli_num_rows($query1) == 1) {
        $query2 = mysqli_fetch_array($query1);
        $_SESSION['ps_id'] = $query2['id'];
        mysqli_query($db, "UPDATE ps_user SET token=NULL WHERE id='".$query2['id']."'");
        header("Location: ../");
      }
      else {
        echo "<h1>Error: Invalid SSO Token</h1>";
      }
    }
  }
  else {
    $query1 = mysqli_query($db, "SELECT * FROM ps_user WHERE email='".$_POST['email']."'");
    if (mysqli_num_rows($query1) == 1) {
      $str = generateRandomString();
{'fraction_non_alphanumeric': 0.2015065913370998, 'fraction_numerical': 0.01820464532328939, 'mean_word_length': 3.0354430379746837, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '5492343', 'n_tokens_mistral': 567, 'n_tokens_neox': 557, 'n_words': 101}