T1354 : Resize profile pics (specifically to handle github v3 api)
Reviewed by: epriestley GitHub Pull: https://github.com/facebook/phabricator/pull/140
This commit is contained in:
committed by
epriestley
parent
e683236793
commit
37df05c7a5
@@ -107,7 +107,16 @@ final class PhabricatorOAuthDefaultRegistrationController
|
||||
'name' => $provider->getProviderKey().'-profile.jpg',
|
||||
'authorPHID' => $user->getPHID(),
|
||||
));
|
||||
$user->setProfileImagePHID($file->getPHID());
|
||||
$xformer = new PhabricatorImageTransformer();
|
||||
|
||||
// Resize OAuth image to a reasonable size
|
||||
$small_xformed = $xformer->executeProfileTransform(
|
||||
$file,
|
||||
$width = 50,
|
||||
$min_height = 50,
|
||||
$max_height = 50);
|
||||
|
||||
$user->setProfileImagePHID($small_xformed->getPHID());
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user