mirror of
https://github.com/go-gitea/gitea.git
synced 2024-10-31 22:42:25 +00:00
Fix #150
This commit is contained in:
parent
480a4ae8c5
commit
a7584d16e4
@ -230,9 +230,9 @@ 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
|
||||
}
|
||||
}
|
||||
if err = UpdateAccessWithSession(sess, &accesses[i]); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user