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