diff options
Diffstat (limited to 'routers/user/setting/profile.go')
-rw-r--r-- | routers/user/setting/profile.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/routers/user/setting/profile.go b/routers/user/setting/profile.go index 0bc2b4ee36..8cde81f295 100644 --- a/routers/user/setting/profile.go +++ b/routers/user/setting/profile.go @@ -68,8 +68,13 @@ func HandleUsernameChange(ctx *context.Context, user *models.User, newName strin } return err } - log.Trace("User name changed: %s -> %s", user.Name, newName) + } else { + if err := models.UpdateRepositoryOwnerNames(user.ID, newName); err != nil { + ctx.ServerError("UpdateRepository", err) + return err + } } + log.Trace("User name changed: %s -> %s", user.Name, newName) return nil } @@ -85,6 +90,7 @@ func ProfilePost(ctx *context.Context) { } if len(form.Name) != 0 && ctx.User.Name != form.Name { + log.Debug("Changing name for %s to %s", ctx.User.Name, form.Name) if err := HandleUsernameChange(ctx, ctx.User, form.Name); err != nil { ctx.Redirect(setting.AppSubURL + "/user/settings") return |