Fix bug when change user name (#25637)

Fix #25621

Co-authored-by: Giteabot <teabot@gitea.io>
pull/25543/head^2
Lunny Xiao 2 years ago committed by GitHub
parent 45bc180a15
commit f1cb461c1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      models/user/redirect.go

@ -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
}

Loading…
Cancel
Save