mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-11 18:14:15 +01:00
Backport #25637 by @lunny
Fix #25621
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 37bf5e761a
)
This commit is contained in:
parent
3d7e1ce24c
commit
27796464cf
1 changed files with 4 additions and 0 deletions
|
@ -64,6 +64,10 @@ func NewUserRedirect(ctx context.Context, ID int64, oldUserName, newUserName str
|
||||||
oldUserName = strings.ToLower(oldUserName)
|
oldUserName = strings.ToLower(oldUserName)
|
||||||
newUserName = strings.ToLower(newUserName)
|
newUserName = strings.ToLower(newUserName)
|
||||||
|
|
||||||
|
if err := DeleteUserRedirect(ctx, oldUserName); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
if err := DeleteUserRedirect(ctx, newUserName); err != nil {
|
if err := DeleteUserRedirect(ctx, newUserName); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue