diff --git a/website/public/emailconfirm.php b/website/public/emailconfirm.php index 2812eaa..d0cc5a3 100644 --- a/website/public/emailconfirm.php +++ b/website/public/emailconfirm.php @@ -2,7 +2,7 @@ include_once("../queries/connect.php"); include_once("../views/messagepage.php"); if (array_key_exists("u", $_GET) and array_key_exists("h", $_GET)) { - $checkHash = $GLOBALS["db"]->prepare(" + $checkHash = prepareQuery(" SELECT `email`, `role` @@ -28,7 +28,7 @@ if (array_key_exists("u", $_GET) and array_key_exists("h", $_GET)) { function doActivate(string $email) { if (password_verify($email, $_GET["h"])) { - $confirmUser = $GLOBALS["db"]->prepare(" + $confirmUser = prepareQuery(" UPDATE `user` SET diff --git a/website/public/resetpassword.php b/website/public/resetpassword.php index 3ca2698..795e6e3 100644 --- a/website/public/resetpassword.php +++ b/website/public/resetpassword.php @@ -28,7 +28,7 @@ if ($_SERVER["REQUEST_METHOD"] == "GET") { } function changePassword() { - $stmt = $GLOBALS["db"]->prepare(" + $stmt = prepareQuery(" UPDATE `user` SET @@ -42,7 +42,7 @@ function changePassword() { } function verifyLink(int $userID, string $hash) { - $stmt = $GLOBALS["db"]->prepare(" + $stmt = prepareQuery(" SELECT `password` FROM