summaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-01 09:09:37 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-01 09:09:37 -0400
commita7584d16e4c650aaac568ba9b5ac7dd4de90fd02 (patch)
tree34ecf124a713b55d454449ee1dd9400a4f7caba2 /models/user.go
parent480a4ae8c558a9946addda06b2a7d4ece8c145af (diff)
downloadgitea-a7584d16e4c650aaac568ba9b5ac7dd4de90fd02.tar.gz
gitea-a7584d16e4c650aaac568ba9b5ac7dd4de90fd02.zip
Fix #150
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/user.go b/models/user.go
index 22334c8436..e340eed441 100644
--- a/models/user.go
+++ b/models/user.go
@@ -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
}
}