aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/access.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/access.php')
-rw-r--r--engine/lib/access.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php
index f5e12541a..8600fc719 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -118,9 +118,12 @@
//if (!is_privileged())
//{
- $access = get_access_list();
+ $access = get_access_list();
+
+ $owner = $_SESSION['id'];
+ if (!$owner) $owner = -1;
- $sql = " ({$table_prefix}access_id in {$access} or ({$table_prefix}access_id = 0 and {$table_prefix}owner_guid = {$_SESSION['id']}))";
+ $sql = " ({$table_prefix}access_id in {$access} or ({$table_prefix}access_id = 0 and {$table_prefix}owner_guid = $owner))";
//}
//else
// $sql = " 1 ";