Code cleanup and some fixes

This commit is contained in:
shr3dd3r committed 2023-08-30 04:41:13 +03:00
1 parent 41ddbcab9e
commit 074ce120e9
6 files changed
+43 -32

No files matched your search

+2 -1
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;
}