summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xincludes/classes/LibertyProtector.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/classes/LibertyProtector.php b/includes/classes/LibertyProtector.php
index 40352fa..28240c9 100755
--- a/includes/classes/LibertyProtector.php
+++ b/includes/classes/LibertyProtector.php
@@ -101,7 +101,7 @@ function protector_content_list() {
function protector_content_load( $pContent = null ) {
global $gBitUser;
$userId = $gBitUser->mUserId ?? 0;
- $roles = \array_keys($gBitUser->getRoles( $userId , true ));
+ $roles = \array_keys($gBitUser->getRoles( $userId ?? 0, true ));
protector_content_verify_access( $pContent, $roles );
$ret = [
'join_sql' => " LEFT JOIN `" . BIT_DB_PREFIX . "liberty_content_role_map` lcrm ON ( lc.`content_id`=lcrm.`content_id` ) LEFT OUTER JOIN `" . BIT_DB_PREFIX . "users_roles_map` purm ON ( purm.`role_id`=lcrm.`role_id` ) ",