[GITEA] Allow changing the email address before activation (squash)

See https://codeberg.org/forgejo/forgejo/pulls/2300
This commit is contained in:
Earl Warren 2024-02-05 16:49:19 +01:00
parent ecfc3cb3f0
commit 030cdd6ae2
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
5 changed files with 52 additions and 52 deletions

View file

@ -715,7 +715,7 @@ func ActivatePost(ctx *context.Context) {
ctx.Data["ResendLimited"] = true
} else {
ctx.Data["ActiveCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale)
err := user_model.ReplaceInactivePrimaryEmail(ctx, ctx.Doer.Email, &user_model.EmailAddress{
err := user_service.ReplaceInactivePrimaryEmail(ctx, ctx.Doer.Email, &user_model.EmailAddress{
UID: ctx.Doer.ID,
Email: email,
})