Added confirmation login email

This commit is contained in:
Joey Lai
2017-01-25 12:48:30 +01:00
parent 93ddefa42f
commit aa48092d27
4 changed files with 15 additions and 1 deletions

View File

@@ -8,4 +8,11 @@ function checkLoggedIn() {
function bannedAlert(){
alert("Your account is banned");
}
function emailNotConfirmed(userID){
if (confirm("Your email is not confirmed.\nPress ok to send another confirmation.") == true) {
sendConfirmEmail(userID);
}
}

View File

@@ -5,6 +5,7 @@
require_once("../queries/connect.php");
include_once("../queries/login.php");
include_once("../queries/checkInput.php");
include_once("../queries/emailconfirm.php");
?>
<body>
<?php
@@ -23,7 +24,7 @@
// Trying to login
if ($_SERVER["REQUEST_METHOD"] == "POST") {
try{
$uname = strtolower(test_input($_POST["uname"]));
$uname = ($_POST["uname"]);
validateLogin($_POST["uname"], $_POST["psw"]);
} catch(loginException $e) {
$loginErr = $e->getMessage();

View File

@@ -5,6 +5,7 @@
require_once("../queries/connect.php");
include_once("../queries/register.php");
include_once("../queries/checkInput.php");
include_once("../queries/emailconfirm.php");
?>
<body>
<?php
@@ -91,6 +92,7 @@
try {
getIp();
registerCheck($correct);
sendConfirmEmailUsername($username);
} catch(registerException $e){
$genericErr = $e->getMessage();
}