Fix bug when change user name () ()

Backport  by @lunny

Fix 

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 37bf5e761a)
This commit is contained in:
Giteabot 2023-07-03 17:00:44 -04:00 committed by Loïc Dachary
parent 3d7e1ce24c
commit 27796464cf
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2

View file

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