🐛 User not added to DB - force die() on error
Signed-off-by: Luke Tainton <luke@tainton.uk>
This commit is contained in:
@@ -6,6 +6,23 @@
|
||||
return $version;
|
||||
}
|
||||
|
||||
function user_exists($db, $uuid)
|
||||
{
|
||||
try {
|
||||
$sql = $db->prepare("SELECT uuid FROM users WHERE uuid=:uuid");
|
||||
$sql->bindParam(':uuid', $uuid);
|
||||
$sql->execute();
|
||||
} catch (PDOException $e) {
|
||||
$alert = array("danger", "Error during check for user record: " . $e->getMessage());
|
||||
}
|
||||
if (empty($sql))
|
||||
{
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function get_all_users($db)
|
||||
{
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user