Code cleanup and some fixes

This commit is contained in:
2023-08-30 04:41:13 +03:00
parent 41ddbcab9e
commit 074ce120e9
6 changed files with 43 additions and 32 deletions

View File

@@ -17,7 +17,7 @@ function User_LoginExist ($login): bool {
}
// Check if user has specified role
function User_HasRole ($id, $role): bool {
function User_HasRole ($id, $role) {
global $db;
$s = $db->prepare("SELECT * FROM users WHERE id = ?");
@@ -32,6 +32,7 @@ function User_HasRole ($id, $role): bool {
if ($d["role"] == $role) {
return true;
}
return false;
}