31 $file->owner_guid =
$guid;
32 $file->setFilename(
"profile/{$guid}{$name}.jpg");
34 $file->write($resized);
39 foreach (
$files as $file) {
58 $view =
'river/user/default/profileiconupdate';
62 'action_type' =>
'update',
63 'subject_guid' =>
$owner->guid,
64 'object_guid' =>
$owner->guid,
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
if(!$owner||!($owner instanceof ElggUser)||!$owner->canEdit()) $error
if($guid==elgg_get_logged_in_user_guid()) $name
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
elgg_get_friendly_upload_error($error_code)
Returns a human-readable message for PHP's upload error codes.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
elgg_create_river_item(array $options=array())
Adds an item to the river.
elgg system_message
Wrapper function for system_messages.
elgg register_error
Wrapper function for system_messages.
elgg_delete_river(array $options=array())
Delete river items.
get_resized_image_from_uploaded_file($input_name, $maxwidth, $maxheight, $square=false, $upscale=false)
Gets the jpeg contents of the resized version of an uploaded image (Returns false if the uploaded fil...
elgg_trigger_event($event, $object_type, $object=null)
Trigger an Elgg Event and attempt to run all handler callbacks registered to that event...
$guid
Avatar upload action.
get_entity($guid)
Loads and returns an entity object from a guid.