Browse Source

Fix #150

for-closed-social
Unknown 10 years ago
parent
commit
a7584d16e4
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      models/user.go

+ 3
- 3
models/user.go View File

@ -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…
Cancel
Save