summaryrefslogtreecommitdiff
path: root/actions/userauthorization.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-09 23:13:11 +0000
committerEvan Prodromou <evan@controlyourself.ca>2009-02-09 23:13:11 +0000
commit47a5d2b7f06cd1612734c47ad21fc397bbff5276 (patch)
tree5486a2282e2925767722a3cae81fb3b1d9fa2753 /actions/userauthorization.php
parent32744124bcb8aa0683490a56defd4a79f072d278 (diff)
Fixed remote subscribe avatar problems
Had some Avatar file-copying issues; seem to be fixed.
Diffstat (limited to 'actions/userauthorization.php')
-rw-r--r--actions/userauthorization.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/actions/userauthorization.php b/actions/userauthorization.php
index 7455a41a6..ed17ceec9 100644
--- a/actions/userauthorization.php
+++ b/actions/userauthorization.php
@@ -330,7 +330,13 @@ class UserauthorizationAction extends Action
{
$temp_filename = tempnam(sys_get_temp_dir(), 'listenee_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 showAcceptMessage($tok)