aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/access.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/access.php')
-rw-r--r--engine/lib/access.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php
index 8600fc719..64d982e30 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -326,6 +326,26 @@
}
+ /**
+ * Displays a user's access collections, using the friends/collections view
+ *
+ * @param int $owner_guid The GUID of the owning user
+ * @return string A formatted rendition of the collections
+ */
+ function elgg_view_access_collections($owner_guid) {
+
+ if ($collections = get_user_access_collections($owner_guid)) {
+
+ foreach($collections as $key => $collection) {
+ $collections[$key]->entities = get_members_of_access_collection($collection->id);
+ }
+
+ }
+
+ return elgg_view('friends/collections',array('collections' => $collections));
+
+ }
+
/**
* Some useful constant definitions
*/