mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 04:06:18 -06:00
fix wrong email address
This commit is contained in:
parent
d3a80b69f0
commit
4bb1e901c6
1 changed files with 3 additions and 3 deletions
|
|
@ -31,7 +31,7 @@ import (
|
|||
)
|
||||
|
||||
func (p *processor) SendConfirmEmail(ctx context.Context, user *gtsmodel.User, username string) error {
|
||||
if user.UnconfirmedEmail == user.Email {
|
||||
if user.UnconfirmedEmail == "" || user.UnconfirmedEmail == user.Email {
|
||||
// user has already confirmed this email address, so there's nothing to do
|
||||
return nil
|
||||
}
|
||||
|
|
@ -60,8 +60,8 @@ func (p *processor) SendConfirmEmail(ctx context.Context, user *gtsmodel.User, u
|
|||
InstanceName: instance.Title,
|
||||
ConfirmLink: confirmationLink,
|
||||
}
|
||||
if err := p.emailSender.SendConfirmEmail(user.Email, confirmData); err != nil {
|
||||
return fmt.Errorf("SendConfirmEmail: error sending to email address %s belonging to user %s: %s", user.Email, username, err)
|
||||
if err := p.emailSender.SendConfirmEmail(user.UnconfirmedEmail, confirmData); err != nil {
|
||||
return fmt.Errorf("SendConfirmEmail: error sending to email address %s belonging to user %s: %s", user.UnconfirmedEmail, username, err)
|
||||
}
|
||||
|
||||
// email sent, now we need to update the user entry with the token we just sent them
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue