diff --git a/app/includes/app_functions.php b/app/includes/app_functions.php index 5d22f3b..62aab20 100644 --- a/app/includes/app_functions.php +++ b/app/includes/app_functions.php @@ -12,10 +12,13 @@ $sql = $db->prepare("SELECT uuid FROM users WHERE uuid=:uuid"); $sql->bindParam(':uuid', $uuid); $sql->execute(); + $sql->setFetchMode(PDO::FETCH_ASSOC); + $result = $sql->fetchAll(); } catch (PDOException $e) { $alert = array("danger", "Error during check for user record: " . $e->getMessage()); + die(); } - if (empty($sql)) { + if (empty($result)) { return false; } else { return true; diff --git a/app/includes/footer.php b/app/includes/footer.php index e2b63c7..eb35ce2 100644 --- a/app/includes/footer.php +++ b/app/includes/footer.php @@ -1,7 +1,7 @@