Skip to content

Commit

Permalink
Fix bug when change user name (go-gitea#25637) (go-gitea#25646)
Browse files Browse the repository at this point in the history
Backport go-gitea#25637 by @lunny

Fix go-gitea#25621

Co-authored-by: Lunny Xiao <[email protected]>
  • Loading branch information
GiteaBot and lunny committed Jul 3, 2023
1 parent f51c8e0 commit 64ed262
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 64ed262

Please sign in to comment.