diff --git a/website/queries/checkInput.php b/website/queries/checkInput.php index 3d17f43..03f7b48 100644 --- a/website/queries/checkInput.php +++ b/website/queries/checkInput.php @@ -41,7 +41,11 @@ function checkInputChoice($variable, $option){ } } -/* Checks for only letters and spaces. */ +/** + * Checks for only letters and spaces. + * @param $variable + * @throws lettersAndSpacesException + */ function checkName($variable){ if (empty($variable)) { throw new lettersAndSpacesException("Verplicht!"); @@ -52,7 +56,11 @@ function checkName($variable){ } } -/* Checks for bday */ +/** + * Checks for bday + * @param $variable + * @throws bdayException + */ function validateBday($variable){ if (empty($variable)) { throw new bdayException("Verplicht!"); @@ -220,6 +228,9 @@ function test_input($data) { return $data; } +/** + * Class lettersAndSpacesException + */ class lettersAndSpacesException extends Exception { public function __construct($message = "", $code = 0, Exception $previous = null) @@ -228,7 +239,9 @@ class lettersAndSpacesException extends Exception } } - +/** + * Class bdayException + */ class bdayException extends Exception { public function __construct($message = "", $code = 0, Exception $previous = null) @@ -237,6 +250,9 @@ class bdayException extends Exception } } +/** + * Class usernameException + */ class usernameException extends Exception { public function __construct($message = "", $code = 0, Exception $previous = null) @@ -245,6 +261,9 @@ class usernameException extends Exception } } +/** + * Class passwordException + */ class passwordException extends Exception { public function __construct($message = "", $code = 0, Exception $previous = null) @@ -253,6 +272,9 @@ class passwordException extends Exception } } +/** + * Class confirmPasswordException + */ class confirmPasswordException extends Exception { public function __construct($message = "", $code = 0, Exception $previous = null) @@ -261,6 +283,9 @@ class confirmPasswordException extends Exception } } +/** + * Class fbConfirmPasswordException + */ class fbConfirmPasswordException extends Exception { public function __construct($message = "", $code = 0, Exception $previous = null) @@ -269,6 +294,9 @@ class fbConfirmPasswordException extends Exception } } +/** + * Class emailException + */ class emailException extends Exception { public function __construct($message = "", $code = 0, Exception $previous = null) @@ -277,6 +305,9 @@ class emailException extends Exception } } +/** + * Class confirmEmailException + */ class confirmEmailException extends Exception { public function __construct($message = "", $code = 0, Exception $previous = null) @@ -285,6 +316,9 @@ class confirmEmailException extends Exception } } +/** + * Class captchaException + */ class captchaException extends Exception { public function __construct($message = "", $code = 0, Exception $previous = null) @@ -293,6 +327,9 @@ class captchaException extends Exception } } +/** + * Class registerException + */ class registerException extends Exception { public function __construct($message = "", $code = 0, Exception $previous = null) diff --git a/website/queries/createGroup.php b/website/queries/createGroup.php index 1b093fb..84843d2 100644 --- a/website/queries/createGroup.php +++ b/website/queries/createGroup.php @@ -8,6 +8,7 @@ require_once "../queries/alerts.php"; */ function createGroup() { + // Creates the group. $createGroup = prepareQuery(" INSERT INTO `group_page` (`name`, `description`) @@ -17,6 +18,7 @@ function createGroup() $createGroup->bindValue(':description', test_input($_POST["bio"])); $createGroup->execute(); + // Gets the groupID just created. $getGroupID = prepareQuery(" SELECT `groupID` @@ -28,6 +30,7 @@ function createGroup() $getGroupID->execute(); $groupID = $getGroupID->fetch()["groupID"]; + // Adds the user as an admin. $makeUserAdmin = prepareQuery(" INSERT INTO `group_member` (userID, groupID, role) diff --git a/website/queries/emailconfirm.php b/website/queries/emailconfirm.php index 0e6aab1..ff9c672 100644 --- a/website/queries/emailconfirm.php +++ b/website/queries/emailconfirm.php @@ -1,5 +1,8 @@