aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/access.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php
index 471b85236..c04b7a9bc 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -77,7 +77,15 @@
if ($collections = get_data($query)) {
foreach($collections as $collection)
- $tmp_access_array[] = $collection->access_collection_id;
+ if (!empty($collection->access_collection_id)) $tmp_access_array[] = $collection->access_collection_id;
+ }
+
+ $query = "select ag.id from {$CONFIG->dbprefix}access_collections ag ";
+ $query .= " where ag.owner_guid = {$user_id} and (ag.site_guid = {$site_id} or ag.site_guid = 0)";
+
+ if ($collections = get_data($query)) {
+ foreach($collections as $collection)
+ if (!empty($collection->id)) $tmp_access_array[] = $collection->id;
}
$access_array[$user_id] = $tmp_access_array;