Add mods/admin to a group.

This commit is contained in:
Marijn Jansen
2017-02-02 21:14:25 +01:00
parent 74145d5d1c
commit 74e91ed7cb
4 changed files with 113 additions and 6 deletions

View File

@@ -148,6 +148,10 @@ function doChangePassword() {
}
}
/**
* Changes the users email if it is valid.
* @throws AngryAlert
*/
function changeEmail() {
if (test_input($_POST["email"]) == test_input($_POST["email-confirm"])) {
@@ -164,6 +168,11 @@ function changeEmail() {
}
}
/**
* Checks if an emailadres is available in the database.
* @param $email
* @throws AngryAlert
*/
function emailIsAvailableInDatabase($email) {
$stmt = prepareQuery("
SELECT
@@ -181,6 +190,12 @@ function emailIsAvailableInDatabase($email) {
}
}
/**
* Does the actual changing of an email-adress.
* @param $email
* @throws AngryAlert
* @throws HappyAlert
*/
function doChangeEmail($email) {
$stmt = prepareQuery("
UPDATE