Skip to content

Commit

Permalink
Fix bug when change user name (go-gitea#25637)
Browse files Browse the repository at this point in the history
Fix go-gitea#25621

Co-authored-by: Giteabot <teabot@gitea.io>
  • Loading branch information
lunny and GiteaBot committed Jul 3, 2023
1 parent f51c8e0 commit 0b5084e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/user/redirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ func NewUserRedirect(ctx context.Context, ID int64, oldUserName, newUserName str
oldUserName = strings.ToLower(oldUserName)
newUserName = strings.ToLower(newUserName)

if err := DeleteUserRedirect(ctx, oldUserName); err != nil {
return err
}

if err := DeleteUserRedirect(ctx, newUserName); err != nil {
return err
}
Expand Down

0 comments on commit 0b5084e

Please sign in to comment.