summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-09 15:24:54 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-09 15:24:54 +0100
commitb9f5c5ad7f6fc68b236af01f6cb886776714b800 (patch)
tree48891809dae5ff1fb389f36da095fdec49a3e717
parentd1693e586ed238efc0d579c2d39dac09015bbba8 (diff)
downloadprotector-b9f5c5ad7f6fc68b236af01f6cb886776714b800.tar.gz
protector-b9f5c5ad7f6fc68b236af01f6cb886776714b800.tar.bz2
protector-b9f5c5ad7f6fc68b236af01f6cb886776714b800.zip
default to no user set
-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` ) ",