diff options
author | Sean Murphy <sgmurphy@gmail.com> | 2009-02-09 20:18:27 -0500 |
---|---|---|
committer | Sean Murphy <sgmurphy@gmail.com> | 2009-02-09 20:18:27 -0500 |
commit | d8ed013612aa974753e25b933cf379fa76002c64 (patch) | |
tree | 09f77c2539e4375310dd0ee0475197bf9d29a6e6 /actions/userauthorization.php | |
parent | 55fcc150fe90156ad33f8627128c7ae555662528 (diff) | |
parent | 47a5d2b7f06cd1612734c47ad21fc397bbff5276 (diff) |
Merge commit 'upstream/0.7.x' into 0.7.x
Diffstat (limited to 'actions/userauthorization.php')
-rw-r--r-- | actions/userauthorization.php | 8 |
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) |