aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/user/setting/account.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-02-27 18:55:13 +0800
committerGitHub <noreply@github.com>2024-02-27 10:55:13 +0000
commit6bdfc84e6c579861e034962acf9727bd39774f0f (patch)
treee1184a3e55fb03ec14750ee679b4a00fc6c21734 /routers/web/user/setting/account.go
parent6ed74a3fc792669d2d15ab777bd7408265a67ea5 (diff)
downloadgitea-6bdfc84e6c579861e034962acf9727bd39774f0f.tar.gz
gitea-6bdfc84e6c579861e034962acf9727bd39774f0f.zip
Allow to change primary email before account activation (#29412)
Diffstat (limited to 'routers/web/user/setting/account.go')
-rw-r--r--routers/web/user/setting/account.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/user/setting/account.go b/routers/web/user/setting/account.go
index 23d3ca3161..abb5873e98 100644
--- a/routers/web/user/setting/account.go
+++ b/routers/web/user/setting/account.go
@@ -92,9 +92,9 @@ func EmailPost(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("settings")
ctx.Data["PageIsSettingsAccount"] = true
- // Make emailaddress primary.
+ // Make email address primary.
if ctx.FormString("_method") == "PRIMARY" {
- if err := user_model.MakeEmailPrimary(ctx, &user_model.EmailAddress{ID: ctx.FormInt64("id")}); err != nil {
+ if err := user_model.MakeActiveEmailPrimary(ctx, ctx.FormInt64("id")); err != nil {
ctx.ServerError("MakeEmailPrimary", err)
return
}