]> source.dussan.org Git - gitea.git/commitdiff
Honor REGISTER_MANUAL_CONFIRM when doing openid registration (#14548)
authorMichel Ganguin <michel@ganguin.net>
Fri, 5 Feb 2021 03:03:20 +0000 (04:03 +0100)
committerGitHub <noreply@github.com>
Fri, 5 Feb 2021 03:03:20 +0000 (04:03 +0100)
REGISTER_MANUAL_CONFIRM is not honored when doing performing an openid registration. The new account is directly accessible.

With this patch, the manual confirm flag gets honored in the same way as a "normal" registration.

routers/user/auth_openid.go

index 3f5c9f7248ce09cf15f2557179da93c266e3bafe..e79085e94d400558c4086f2b6bb74fe3afa876ce 100644 (file)
@@ -415,7 +415,7 @@ func RegisterOpenIDPost(ctx *context.Context) {
                Name:     form.UserName,
                Email:    form.Email,
                Passwd:   password,
-               IsActive: !setting.Service.RegisterEmailConfirm,
+               IsActive: !(setting.Service.RegisterEmailConfirm || setting.Service.RegisterManualConfirm),
        }
        //nolint: dupl
        if err := models.CreateUser(u); err != nil {