diff --git a/website/public/js/registerAndLogin.js b/website/public/js/registerAndLogin.js index 87351bf..ef49e83 100644 --- a/website/public/js/registerAndLogin.js +++ b/website/public/js/registerAndLogin.js @@ -10,9 +10,6 @@ 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); - } - +function emailNotConfirmed(){ + alert("Your account has not been verified yet!\nAnother email has been sent to you") } \ No newline at end of file diff --git a/website/queries/login.php b/website/queries/login.php index 2955942..2af255a 100644 --- a/website/queries/login.php +++ b/website/queries/login.php @@ -35,8 +35,9 @@ function validateLogin($username, $password){ window.onload=bannedAlert(); "; } else if ($role == "unconfirmed"){ + sendConfirmEmail(getUser()["userID"]); echo ""; } else { $_SESSION["userID"] = $userID; @@ -56,4 +57,5 @@ class loginException extends Exception parent::__construct($message, $code, $previous); } } -?> \ No newline at end of file +?> +