We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 000e5c0c authored by Zach Copley's avatar Zach Copley

Do a better job of saving the original avatar from Facebook

parent 3b28f226
......@@ -458,9 +458,13 @@ class FacebookfinishloginAction extends Action
common_log(LOG_WARNING, 'Couldn\'t save tmp Facebook avatar: ' . $tmpname, __FILE__);
} else {
// save it as an avatar
$file = new ImageFile($user->id, Avatar::path($tmpname));
$filename = $file->resize(180); // size of the biggest img we get from Facebook
$profile = $user->getProfile();
if ($profile->setOriginal($tmpname)) {
if ($profile->setOriginal($filename)) {
......@@ -475,7 +479,7 @@ class FacebookfinishloginAction extends Action
// clean up
// clean up tmp file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment