diff --git a/src/applications/auth/controller/oauth/PhabricatorOAuthLoginController.php b/src/applications/auth/controller/oauth/PhabricatorOAuthLoginController.php index 037d7d078c..ceefaae846 100644 --- a/src/applications/auth/controller/oauth/PhabricatorOAuthLoginController.php +++ b/src/applications/auth/controller/oauth/PhabricatorOAuthLoginController.php @@ -141,6 +141,8 @@ class PhabricatorOAuthLoginController extends PhabricatorAuthController { // Login with known auth. if ($oauth_info->getID()) { + $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); + $known_user = id(new PhabricatorUser())->load($oauth_info->getUserID()); $request->getApplicationConfiguration()->willAuthenticateUserWithOAuth(