Fixed reset password

This commit is contained in:
Joey Lai
2017-01-25 16:19:34 +01:00
parent ded314f4d6
commit 4c5ea08614
3 changed files with 30 additions and 1 deletions

View File

@@ -97,6 +97,18 @@ function validateEmail($variable){
}
}
/* checks if an input is a valid email. */
function resetEmail($variable){
if (empty($variable)) {
throw new emailException("Verplicht!");
} else if (!filter_var($variable, FILTER_VALIDATE_EMAIL)) {
throw new emailException("Geldige email invullen");
} else if (getResetEmail() == 0){
throw new emailException("Email bestaat niet!");
}
}
/* checks if two passwords matches. */
function matchPassword(){
if ($_POST["password"] != $_POST["confirmpassword"]) {