Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 37bf5e7

Browse files
GiteaBotlunny
andauthoredJul 3, 2023
Fix bug when change user name (go-gitea#25637) (go-gitea#25645)
Backport go-gitea#25637 by @lunny Fix go-gitea#25621 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 parent 45d8d63 commit 37bf5e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎models/user/redirect.go

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ func NewUserRedirect(ctx context.Context, ID int64, oldUserName, newUserName str
6464
oldUserName = strings.ToLower(oldUserName)
6565
newUserName = strings.ToLower(newUserName)
6666

67+
if err := DeleteUserRedirect(ctx, oldUserName); err != nil {
68+
return err
69+
}
70+
6771
if err := DeleteUserRedirect(ctx, newUserName); err != nil {
6872
return err
6973
}

0 commit comments

Comments
 (0)
Please sign in to comment.