diff options
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/access.php | 7 |
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 ";
|