Honor REGISTER_MANUAL_CONFIRM when doing openid registration (#14548)

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.
This commit is contained in:
Michel Ganguin 2021-02-05 04:03:20 +01:00 committed by GitHub
parent 32c4563d8d
commit 4457d0e8d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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