From 38ad588be32b07e4034feebfbaf161f199cbbea3 Mon Sep 17 00:00:00 2001 From: Alexander Davis Date: Mon, 17 Aug 2020 16:57:58 +0100 Subject: [PATCH] Try Somethin New Today --- app/includes/app_functions.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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; } }