diff options
author | Meano <Meano@foxmail.com> | 2021-07-14 04:59:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 22:59:27 +0200 |
commit | 423a0fccb6df5a1e12d70719cb9e28164b28428a (patch) | |
tree | 9619f5a44d25a947a3f1abb807a9416afeb789d4 /templates | |
parent | 56b7f53329afa913055f5157537614b80d2d4e30 (diff) | |
download | gitea-423a0fccb6df5a1e12d70719cb9e28164b28428a.tar.gz gitea-423a0fccb6df5a1e12d70719cb9e28164b28428a.zip |
Fix activation of primary email addresses (#16385)
* fix: primary email cannot be activated
* Primary email should be activated together with user account when
'RegisterEmailConfirm' is enabled.
* To fix the existing error state. When 'RegisterEmailConfirm' is enabled, the
admin should have permission to modify the activations status of user email.
And the user should be allowed to send activation to primary email.
* Only judge whether email is primary from email_address table.
* Improve logging and refactor isEmailActive
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/settings/account.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl index 1a74c64d74..2e1976aaa9 100644 --- a/templates/user/settings/account.tmpl +++ b/templates/user/settings/account.tmpl @@ -92,7 +92,7 @@ <form action="{{AppSubUrl}}/user/settings/account/email" method="post"> {{$.CsrfTokenHtml}} <input name="_method" type="hidden" value="SENDACTIVATION"> - <input name="id" type="hidden" value="{{if .IsPrimary}}PRIMARY{{else}}{{.ID}}{{end}}"> + <input name="id" type="hidden" value="{{.ID}}"> {{if $.ActivationsPending}} <button disabled class="ui blue tiny button">{{$.i18n.Tr "settings.activations_pending"}}</button> {{else}} |