New database connect style #150

Merged
11166932 merged 1 commits from marijn-dbConnect into master 2017-01-30 12:10:40 +01:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit c1a7ccc076 - Show all commits

View File

@@ -2,7 +2,7 @@
include_once("../queries/connect.php"); include_once("../queries/connect.php");
include_once("../views/messagepage.php"); include_once("../views/messagepage.php");
if (array_key_exists("u", $_GET) and array_key_exists("h", $_GET)) { if (array_key_exists("u", $_GET) and array_key_exists("h", $_GET)) {
$checkHash = $GLOBALS["db"]->prepare(" $checkHash = prepareQuery("
SELECT SELECT
`email`, `email`,
`role` `role`
@@ -28,7 +28,7 @@ if (array_key_exists("u", $_GET) and array_key_exists("h", $_GET)) {
function doActivate(string $email) { function doActivate(string $email) {
if (password_verify($email, $_GET["h"])) { if (password_verify($email, $_GET["h"])) {
$confirmUser = $GLOBALS["db"]->prepare(" $confirmUser = prepareQuery("
UPDATE UPDATE
`user` `user`
SET SET

View File

@@ -28,7 +28,7 @@ if ($_SERVER["REQUEST_METHOD"] == "GET") {
} }
function changePassword() { function changePassword() {
$stmt = $GLOBALS["db"]->prepare(" $stmt = prepareQuery("
UPDATE UPDATE
`user` `user`
SET SET
@@ -42,7 +42,7 @@ function changePassword() {
} }
function verifyLink(int $userID, string $hash) { function verifyLink(int $userID, string $hash) {
$stmt = $GLOBALS["db"]->prepare(" $stmt = prepareQuery("
SELECT SELECT
`password` `password`
FROM FROM