summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-11 21:23:19 -0500
committerUnknwon <u@gogs.io>2015-12-11 21:23:19 -0500
commit0cce4439ceab9d53592e526f8840348a293e463d (patch)
tree9bb5fdf1a77dbdc54bea214924f6a59875896a81 /routers
parent59c965a5ec2553b40a76cc322855b62116eac5f0 (diff)
downloadgitea-0cce4439ceab9d53592e526f8840348a293e463d.tar.gz
gitea-0cce4439ceab9d53592e526f8840348a293e463d.zip
#2154 minor fix
Diffstat (limited to 'routers')
-rw-r--r--routers/user/setting.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/user/setting.go b/routers/user/setting.go
index 3cb9f0aece..b338e112ab 100644
--- a/routers/user/setting.go
+++ b/routers/user/setting.go
@@ -40,7 +40,7 @@ func Settings(ctx *middleware.Context) {
}
func handlerUsernameChange(ctx *middleware.Context, newName string) {
- if len(newName) == 0 {
+ if len(newName) == 0 || !ctx.User.IsLocal() {
return
}