FIxed confirmation login

This commit is contained in:
Joey Lai
2017-01-25 13:43:08 +01:00
parent 30d1ef40f4
commit e840def733
2 changed files with 6 additions and 7 deletions

View File

@@ -10,9 +10,6 @@ function bannedAlert(){
alert("Your account is banned"); alert("Your account is banned");
} }
function emailNotConfirmed(userID){ function emailNotConfirmed(){
if (confirm("Your email is not confirmed.\nPress ok to send another confirmation.") == true) { alert("Your account has not been verified yet!\nAnother email has been sent to you")
sendConfirmEmail(userID);
}
} }

View File

@@ -35,8 +35,9 @@ function validateLogin($username, $password){
window.onload=bannedAlert(); window.onload=bannedAlert();
</script>"; </script>";
} else if ($role == "unconfirmed"){ } else if ($role == "unconfirmed"){
sendConfirmEmail(getUser()["userID"]);
echo "<script> echo "<script>
window.onload=emailNotConfirmed('userID'); window.onload=emailNotConfirmed();
</script>"; </script>";
} else { } else {
$_SESSION["userID"] = $userID; $_SESSION["userID"] = $userID;
@@ -56,4 +57,5 @@ class loginException extends Exception
parent::__construct($message, $code, $previous); parent::__construct($message, $code, $previous);
} }
} }
?> ?>