diff --git a/app/includes/app_functions.php b/app/includes/app_functions.php index 5d22f3b..a712ff0 100644 --- a/app/includes/app_functions.php +++ b/app/includes/app_functions.php @@ -12,13 +12,16 @@ $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)) { - return false; + if (empty($result)) { + return false; } else { - return true; + 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 @@