aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-09-10 10:34:45 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-09-10 10:34:45 +0000
commit1e41f151ff3a48eeac21e2b83d9c4c4dd447b839 (patch)
tree58247a4ebe68f82b6ac383019d1d0343802144fc /engine/lib
parentc54eaadce03b36df86d56c308f41c2a58b7f8fd7 (diff)
downloadelgg-1e41f151ff3a48eeac21e2b83d9c4c4dd447b839.tar.gz
elgg-1e41f151ff3a48eeac21e2b83d9c4c4dd447b839.tar.bz2
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
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/access.php7
1 files 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 ';