diff --git a/routers/web/user/auth.go b/routers/web/user/auth.go
index 12328e46a1..65515402cf 100644
--- a/routers/web/user/auth.go
+++ b/routers/web/user/auth.go
@@ -628,7 +628,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 == "" {