aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/tags.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-14 19:03:58 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-14 19:03:58 +0000
commit9bd5aad2c3bdb4a283d2b15ed0f91e295099c9e2 (patch)
tree8cf4279f57f654d5435dacba4dc2bcb4030d2199 /engine/lib/tags.php
parent2d55e88e095aa1a6b4f58101077aab81788761c9 (diff)
downloadelgg-9bd5aad2c3bdb4a283d2b15ed0f91e295099c9e2.tar.gz
elgg-9bd5aad2c3bdb4a283d2b15ed0f91e295099c9e2.tar.bz2
* Introducing get_loggedin_user() and get_loggedin_userid()
* ACLs now using get_loggedin_user* * Some logic cleaned up * Some "Undefined..." messages cleaned up git-svn-id: https://code.elgg.org/elgg/trunk@2459 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/tags.php')
-rw-r--r--engine/lib/tags.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/engine/lib/tags.php b/engine/lib/tags.php
index 30aa9f78c..107ac3ce7 100644
--- a/engine/lib/tags.php
+++ b/engine/lib/tags.php
@@ -131,8 +131,9 @@
} else if (is_int($owner_guid)) {
$query .= " and e.container_guid = {$owner_guid} ";
}
-
- $query .= " and (e.access_id in {$access} or (e.access_id = 0 and e.owner_guid = {$_SESSION['id']}))";
+
+ $userid = get_loggedin_userid();
+ $query .= " and (e.access_id in {$access} or (e.access_id = 0 and e.owner_guid = {$userid}))";
$query .= " group by msvalue.string having total > {$threshold} order by total desc limit {$limit} ";