Hello,
I am trying to get each user uploaded filesize , and would like to divide the total in two categories , Files with access_Id to Private and Friends , and 1 with Public and Logged in Access - access_id.
I tried doing it with this code, it shows logged-in users file size correctly but don't show private files , can anyone guide me please?
function getUserFileSize($owner_guid,$access_id = 1)
{
$files = get_entities_from_access_id($access_id, 'object', 'file', $owner_guid, 1000);
foreach($files as $file)
{
$size += $file->size();
}
$size = formatBytes($size);
return $size;
}
$publicfiles = getUserFileSize(page_owner());
$privatefiles = getUserFileSize(page_owner(), 0);
$filetypes = get_filetype_cloud(page_owner());
$body = rozce_view_layout('manage',$totalfiles,$publicfiles, $privatefiles, $filetypes);
Aimash.
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.