* @copyright Curverider Ltd 2008-2010 * @link http://elgg.com/ */ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); gatekeeper(); global $CONFIG; $offset = get_input('offset', 0); $limit = 10; // Get the logged in user, you can't see other peoples messages so use session id $page_owner = get_loggedin_user(); set_page_owner($page_owner->getGUID()); // Get the user's inbox, this will be all messages where the 'toId' field matches their guid // @todo - fix hack where limit + 1 messages are requested $messages = elgg_get_entities_from_metadata(array( 'type' => 'object', 'subtype' => 'messages', 'metadata_name' => 'toId', 'metadata_value' => $page_owner->getGUID(), 'owner_guid' => $page_owner->guid, 'limit' => $limit + 1, 'offset' => $offset )); // Set the page title $area2 = "