Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/provider/PhabricatorAuthProvider.php
| Show First 20 Lines • Show All 237 Lines • ▼ Show 20 Lines | if ($image_uri) { | ||||
| // file entry for it, but there's no convenient way to do this with | // file entry for it, but there's no convenient way to do this with | ||||
| // PhabricatorFile right now. The storage will get shared, so the impact | // PhabricatorFile right now. The storage will get shared, so the impact | ||||
| // here is negligible. | // here is negligible. | ||||
| $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); | $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); | ||||
| $image_file = PhabricatorFile::newFromFileDownload( | $image_file = PhabricatorFile::newFromFileDownload( | ||||
| $image_uri, | $image_uri, | ||||
| array( | array( | ||||
| 'name' => $name, | 'name' => $name, | ||||
| 'canCDN' => true | 'canCDN' => true, | ||||
| )); | )); | ||||
| unset($unguarded); | unset($unguarded); | ||||
| if ($image_file) { | if ($image_file) { | ||||
| $account->setProfileImagePHID($image_file->getPHID()); | $account->setProfileImagePHID($image_file->getPHID()); | ||||
| } | } | ||||
| } catch (Exception $ex) { | } catch (Exception $ex) { | ||||
| // Log this but proceed, it's not especially important that we | // Log this but proceed, it's not especially important that we | ||||
| ▲ Show 20 Lines • Show All 232 Lines • Show Last 20 Lines | |||||