diff options
Diffstat (limited to 'actions/finishremotesubscribe.php')
-rw-r--r-- | actions/finishremotesubscribe.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/actions/finishremotesubscribe.php b/actions/finishremotesubscribe.php index f9094a50c..76db887de 100644 --- a/actions/finishremotesubscribe.php +++ b/actions/finishremotesubscribe.php @@ -237,7 +237,13 @@ class FinishremotesubscribeAction extends Action { $temp_filename = tempnam(sys_get_temp_dir(), 'listener_avatar'); copy($url, $temp_filename); - return $profile->setOriginal($temp_filename); + $imagefile = new ImageFile($profile->id, $temp_filename); + $filename = Avatar::filename($profile->id, + image_type_to_extension($imagefile->type), + null, + common_timestamp()); + rename($temp_filename, Avatar::path($filename)); + return $profile->setOriginal($filename); } function access_token($omb) |