Broken login (#122)

* Fixing Login Die

* Fix Broken Login 2

* Update footer

* Try Somethin New Today
This commit was merged in pull request #122.
This commit is contained in:
Alexander Davis
2020-08-17 17:04:34 +01:00
committed by GitHub
parent 49581da52c
commit 26c4f801d3
2 changed files with 7 additions and 4 deletions

View File

@@ -12,13 +12,16 @@
$sql = $db->prepare("SELECT uuid FROM users WHERE uuid=:uuid"); $sql = $db->prepare("SELECT uuid FROM users WHERE uuid=:uuid");
$sql->bindParam(':uuid', $uuid); $sql->bindParam(':uuid', $uuid);
$sql->execute(); $sql->execute();
$sql->setFetchMode(PDO::FETCH_ASSOC);
$result = $sql->fetchAll();
} catch (PDOException $e) { } catch (PDOException $e) {
$alert = array("danger", "Error during check for user record: " . $e->getMessage()); $alert = array("danger", "Error during check for user record: " . $e->getMessage());
die();
} }
if (empty($sql)) { if (empty($result)) {
return false; return false;
} else { } else {
return true; return true;
} }
} }

View File

@@ -1,7 +1,7 @@
<footer class="footer mt-auto py-3"> <footer class="footer mt-auto py-3">
<div class="text-center text-muted"> <div class="text-center text-muted">
<?php <?php
echo($_ENV['APP_NAME'] . " " . get_version() . ".<br>"); echo($_ENV['APP_NAME'] . " " . get_version() . "<br>");
if ($_ENV['APP_NAME'] != "FHeD") { if ($_ENV['APP_NAME'] != "FHeD") {
echo("Powered by FHeD."); echo("Powered by FHeD.");
}; };