Code cleanup and some fixes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user