add name field check in settings

This commit is contained in:
Hendrik
2017-02-02 15:00:01 +01:00
parent 8a6acbc52a
commit 9426f4d6ac
2 changed files with 10 additions and 1 deletions

View File

@@ -50,6 +50,15 @@ function getPasswordHash() {
return $stmt->fetch();
}
function checkUpdateSettings() {
if (empty(test_input($_POST['fname'])) || empty(test_input($_POST['lname']))) {
throw new AngryAlert("Geen voornaam of achternaam.");
return;
}
updateSettings();
}
/**
* Changes the setting from post.
* @throws HappyAlert