From fde6ff6a7584718c925f76425e299a7f985bb4f3 Mon Sep 17 00:00:00 2001 From: Viktor Kuzmin Date: Tue, 12 Oct 2021 08:02:47 +0400 Subject: [PATCH] Backport of fix for auto registration - PR #17219 (#17292) --- routers/web/user/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/user/auth.go b/routers/web/user/auth.go index 4095d2956..0b9874441 100644 --- a/routers/web/user/auth.go +++ b/routers/web/user/auth.go @@ -617,7 +617,7 @@ func SignInOAuthCallback(ctx *context.Context) { } if u == nil { - if !(setting.Service.DisableRegistration || setting.Service.AllowOnlyInternalRegistration) && setting.OAuth2Client.EnableAutoRegistration { + if !setting.Service.AllowOnlyInternalRegistration && setting.OAuth2Client.EnableAutoRegistration { // create new user with details from oauth2 provider var missingFields []string if gothUser.UserID == "" {