aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/users.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r--engine/lib/users.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 5065a633a..16e7a2c5f 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -526,6 +526,27 @@
$total = get_entities('object', $subtype, $user_guid, "time_created desc", null, null, true);
return $total;
}
+
+ /**
+ * Displays a list of user objects of a particular subtype, with navigation.
+ *
+ * @see elgg_view_entity_list
+ *
+ * @param int $user_guid The GUID of the user
+ * @param string $subtype The object subtype
+ * @param int $limit The number of entities to display on a page
+ * @return string The list in a form suitable to display
+ */
+ function list_user_objects($user_guid, $subtype = "", $limit = 10) {
+
+ $offset = (int) get_input('offset');
+ $limit = (int) $limit;
+ $count = (int) count_user_objects($user_guid, $subtype);
+ $entities = get_user_objects($user_guid, $subtype, $limit, $offset);
+
+ return elgg_view_entity_list($entities, $count, $offset, $limit);
+
+ }
/**
* Obtains a list of objects owned by a user's friends
@@ -566,6 +587,27 @@
}
/**
+ * Displays a list of a user's friends' objects of a particular subtype, with navigation.
+ *
+ * @see elgg_view_entity_list
+ *
+ * @param int $user_guid The GUID of the user
+ * @param string $subtype The object subtype
+ * @param int $limit The number of entities to display on a page
+ * @return string The list in a form suitable to display
+ */
+ function list_user_friends_objects($user_guid, $subtype = "", $limit = 10) {
+
+ $offset = (int) get_input('offset');
+ $limit = (int) $limit;
+ $count = (int) count_user_friends_objects($user_guid, $subtype);
+ $entities = get_user_friends_objects($user_guid, $subtype, $limit, $offset);
+
+ return elgg_view_entity_list($entities, $count, $offset, $limit);
+
+ }
+
+ /**
* Get user objects by an array of metadata
*
* @param int $user_guid The GUID of the owning user