mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-10 07:18:06 -06:00
[bugfix] Fix admin account confirm on pre-confirmed account setting email address to empty string (#1203)
This commit is contained in:
parent
34716d7d7d
commit
281f712477
2 changed files with 2 additions and 4 deletions
|
|
@ -111,13 +111,12 @@ var Confirm action.GTSAction = func(ctx context.Context) error {
|
|||
return err
|
||||
}
|
||||
|
||||
updatingColumns := []string{"approved", "email", "confirmed_at", "updated_at"}
|
||||
updatingColumns := []string{"approved", "email", "confirmed_at"}
|
||||
approved := true
|
||||
u.Approved = &approved
|
||||
u.Email = u.UnconfirmedEmail
|
||||
u.ConfirmedAt = time.Now()
|
||||
u.UpdatedAt = time.Now()
|
||||
if err := dbConn.UpdateByID(ctx, u, u.ID, updatingColumns...); err != nil {
|
||||
if err := dbConn.UpdateUser(ctx, u, updatingColumns...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue