<?php

session_start();

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;

require_once './vendor/autoload.php';
require_once './models/User.php';
require_once './include/DatabaseConn.php';
require_once './include/Constants.php';
require_once './include/Helper.php';
require_once './models/LoginRecord.php';
require_once './models/USettings.php';
require_once './include/GoogleAuthenticator.php';
require_once './models/Settings.php';

 $db = new DatabaseConn();
        $link = $db->connect();
var_dump($link);
die();
$user = User::verifyLoginCredentials(User::instantiate($_GET['email'], $_GET['password']), $link);

$_SESSION[USER] = $user->getEmail();
header("location: /dashboard/");
die();
?>