mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-22 18:00:37 +01:00
Fix #150
This commit is contained in:
parent
480a4ae8c5
commit
a7584d16e4
1 changed files with 3 additions and 3 deletions
|
@ -230,11 +230,11 @@ func ChangeUserName(user *User, newUserName string) (err error) {
|
|||
accesses[i].UserName = newUserName
|
||||
if strings.HasPrefix(accesses[i].RepoName, user.LowerName+"/") {
|
||||
accesses[i].RepoName = strings.Replace(accesses[i].RepoName, user.LowerName, newUserName, 1)
|
||||
}
|
||||
if err = UpdateAccessWithSession(sess, &accesses[i]); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repos, err := GetRepositories(user, true)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue