From 1e41f151ff3a48eeac21e2b83d9c4c4dd447b839 Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 10 Sep 2009 10:34:45 +0000 Subject: Checking against admin metadata instead of $is_admin global in get_access_sql_suffix(). git-svn-id: https://code.elgg.org/elgg/trunk@3484 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/access.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/engine/lib/access.php b/engine/lib/access.php index 7ba1970f5..5ccf238c8 100644 --- a/engine/lib/access.php +++ b/engine/lib/access.php @@ -228,10 +228,11 @@ END; if (!$owner) $owner = -1; $access = get_access_list($owner); + + // do NOT use $is_admin global user here, since that only checks against + // the current logged in user. - global $is_admin; - - if (isset($is_admin) && $is_admin == true) { + if ($owner->admin == 'yes') { $sql = " (1 = 1) "; } else if ($owner != -1) { $friends_bit = $table_prefix.'access_id = '.ACCESS_FRIENDS.' AND '; -- cgit v1.2.3