diff options
author | guillep2k <18600385+guillep2k@users.noreply.github.com> | 2020-02-21 10:08:04 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-21 10:08:04 -0300 |
commit | cfcd8e41467dd17c13c2ef80a6f12ae883f1f9f3 (patch) | |
tree | 74920ec597c768fedf3f35238b36363980c31ae6 /models/user_mail.go | |
parent | ac18c3f6f279959decb1ae96027b909841dc5412 (diff) | |
download | gitea-cfcd8e41467dd17c13c2ef80a6f12ae883f1f9f3.tar.gz gitea-cfcd8e41467dd17c13c2ef80a6f12ae883f1f9f3.zip |
Ensure only own addresses are updated (#10397)
Diffstat (limited to 'models/user_mail.go')
-rw-r--r-- | models/user_mail.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user_mail.go b/models/user_mail.go index d929ba5a5d..41f08c9db2 100644 --- a/models/user_mail.go +++ b/models/user_mail.go @@ -201,7 +201,7 @@ func MakeEmailPrimary(email *EmailAddress) error { } // Make sure the former primary email doesn't disappear. - formerPrimaryEmail := &EmailAddress{Email: user.Email} + formerPrimaryEmail := &EmailAddress{UID: user.ID, Email: user.Email} has, err = x.Get(formerPrimaryEmail) if err != nil { return err |