From 5f7294de926cbf643cd62e6dcd32a633f5ad40fd Mon Sep 17 00:00:00 2001 From: Viktor Kuzmin Date: Tue, 12 Oct 2021 00:28:33 +0300 Subject: [PATCH] Backport of fix for auto registration - PR #17219 --- 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 4095d2956e3a5..0b987444110dc 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 == "" {