diff --git a/src/applications/auth/provider/PhabricatorAuthProvider.php b/src/applications/auth/provider/PhabricatorAuthProvider.php index 72d901b488..787d56b587 100644 --- a/src/applications/auth/provider/PhabricatorAuthProvider.php +++ b/src/applications/auth/provider/PhabricatorAuthProvider.php @@ -150,12 +150,15 @@ abstract class PhabricatorAuthProvider { // PhabricatorFile right now. The storage will get shared, so the impact // here is negligible. - $image_uri = $account->getAccountImageURI(); - $image_file = PhabricatorFile::newFromFileDownload( - $image_uri, - array( - 'name' => $name, - )); + $image_uri = $adapter->getAccountImageURI(); + + $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); + $image_file = PhabricatorFile::newFromFileDownload( + $image_uri, + array( + 'name' => $name, + )); + unset($unguarded); $account->setProfileImagePHID($image_file->getPHID()); } catch (Exception $ex) { diff --git a/src/applications/auth/view/PhabricatorAuthAccountView.php b/src/applications/auth/view/PhabricatorAuthAccountView.php index 0b3d1f18a1..9cf19e65df 100644 --- a/src/applications/auth/view/PhabricatorAuthAccountView.php +++ b/src/applications/auth/view/PhabricatorAuthAccountView.php @@ -95,7 +95,7 @@ final class PhabricatorAuthAccountView extends AphrontView { $image_uri = PhabricatorUser::getDefaultProfileImageURI(); if ($account->getProfileImagePHID()) { $image = id(new PhabricatorFileQuery()) - ->setUser(PhabricatorUser::getOmnipotentUser()) + ->setViewer(PhabricatorUser::getOmnipotentUser()) ->withPHIDs(array($account->getProfileImagePHID())) ->executeOne(); if ($image) {