Use the Email address from DB instead of request (#14212)

This commit updates the controller for sending reset pwd Email,
to make it use the Email from DB query result.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
This commit is contained in:
Daniel Jiang 2021-02-09 17:04:15 +08:00 committed by GitHub
parent a0561da5ce
commit 7231679373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -230,7 +230,7 @@ func (cc *CommonController) SendResetEmail() {
60, settings.SSL,
settings.Insecure,
settings.From,
[]string{template.HTMLEscapeString(email)},
[]string{u.Email},
"Reset Harbor user password",
message.String())
if err != nil {