diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-02-27 18:55:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-27 10:55:13 +0000 |
commit | 6bdfc84e6c579861e034962acf9727bd39774f0f (patch) | |
tree | e1184a3e55fb03ec14750ee679b4a00fc6c21734 /routers/web/user/setting/account.go | |
parent | 6ed74a3fc792669d2d15ab777bd7408265a67ea5 (diff) | |
download | gitea-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.go | 4 |
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 } |