I'm trying to get the image entities of friends and the current user. I am trying the following code but doesn't work. How would this be done?
$current_user = elgg_get_logged_in_user_entity ();
$images = elgg_get_entities_from_relationship(array(
'type' => 'object',
'subtype' => 'image',
'full_view' => false,
'limit' => 15,
'offset' => $offset,
'order_by' => 'e.time_created DESC ',
'relationship' => 'friend',
'relationship_guid' => $current_user->guid,
));
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Alejandro@dveloper
Alejandro - 0 likes
You must log in to post replies.When you do elgg_dump($images); nothing comes back?
Try the following.
$images = elgg_get_entities_from_relationship(array(
'type' => 'object',
'subtype' => 'image',
'full_view' => false,
'limit' => 15,
'offset' => $offset,
'order_by' => 'e.time_created DESC ',
'relationship' => 'friend',
'relationship_guid' => $current_user->guid,
'relationship_join_on' => 'container_guid'
));