Fix the bug where every user is an admin

This commit is contained in:
SilicaAndPina 2021-07-10 18:24:09 +12:00
parent 964a4e879c
commit 0e571700fa
3 changed files with 6 additions and 2 deletions

View file

@ -272,7 +272,7 @@ function get_admin(int $userid)
$stmt->bind_param("i", $userid);
$stmt->execute();
$result = $stmt->get_result();
return $result->fetch_row()[0];
return $result->fetch_row()[0] === "YES";
}
@ -285,7 +285,7 @@ function get_mod(int $userid)
$stmt->bind_param("i", $userid);
$stmt->execute();
$result = $stmt->get_result();
return $result->fetch_row()[0];
return $result->fetch_row()[0] === "YES";
}