Differential D12821 Diff 30837 src/applications/auth/controller/PhabricatorAuthRegisterController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthRegisterController.php
Show First 20 Lines • Show All 598 Lines • ▼ Show 20 Lines | private function loadProfilePicture(PhabricatorExternalAccount $account) { | ||||
$file = id(new PhabricatorFileQuery()) | $file = id(new PhabricatorFileQuery()) | ||||
->setViewer(PhabricatorUser::getOmnipotentUser()) | ->setViewer(PhabricatorUser::getOmnipotentUser()) | ||||
->withPHIDs(array($phid)) | ->withPHIDs(array($phid)) | ||||
->executeOne(); | ->executeOne(); | ||||
if (!$file) { | if (!$file) { | ||||
return null; | return null; | ||||
} | } | ||||
try { | $xform = PhabricatorFileTransform::getTransformByKey( | ||||
$xformer = new PhabricatorImageTransformer(); | PhabricatorFileThumbnailTransform::TRANSFORM_PROFILE); | ||||
return $xformer->executeProfileTransform( | return $xform->executeTransform($file); | ||||
$file, | |||||
$width = 50, | |||||
$min_height = 50, | |||||
$max_height = 50); | |||||
} catch (Exception $ex) { | |||||
phlog($ex); | |||||
return null; | |||||
} | |||||
} | } | ||||
protected function renderError($message) { | protected function renderError($message) { | ||||
return $this->renderErrorPage( | return $this->renderErrorPage( | ||||
pht('Registration Failed'), | pht('Registration Failed'), | ||||
array($message)); | array($message)); | ||||
} | } | ||||
Show All 40 Lines |