From d8a0b9c1fa81f107bf8fbe18540f12e99a87deed Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 21 Jul 2008 13:43:27 +0000 Subject: Fixes #175 git-svn-id: https://code.elgg.org/elgg/trunk@1482 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/access.php | 7 +++++-- 1 file 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 "; -- cgit v1.2.3