Add mods/admin to a group.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user