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,
if(! $owner||!($owner instanceof ElggUser)||! $owner->canEdit()) $error
$guid
Avatar upload action.
if($guid==elgg_get_logged_in_user_guid()) $name
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
register_error($error)
Display an error on next page load.
elgg_trigger_event($event, $object_type, $object=null)
Trigger an Elgg Event and attempt to run all handler callbacks registered to that event,...
system_message($message)
Display a system message on next page load.
forward($location="", $reason='system')
Forward to $location.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
elgg_delete_river(array $options=array())
Delete river items.
elgg_create_river_item(array $options=array())
Adds an item to the river.
get_entity($guid)
Loads and returns an entity object from a guid.
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_get_friendly_upload_error($error_code)
Returns a human-readable message for PHP's upload error codes.