summaryrefslogtreecommitdiffstats
path: root/routers/user
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2019-05-28 23:45:54 +0800
committerGitHub <noreply@github.com>2019-05-28 23:45:54 +0800
commit743697a549bda16508ab961ac79a8bc5bdca3bbd (patch)
tree23d40a210acd7b84dd62f6c5ec73dfea938faa5f /routers/user
parent31557b12744410633ceb6fc12b53fb09038cee35 (diff)
downloadgitea-743697a549bda16508ab961ac79a8bc5bdca3bbd.tar.gz
gitea-743697a549bda16508ab961ac79a8bc5bdca3bbd.zip
refactor: append, build variable and type switch (#4940)
* refactor: append, build variable and type switch * fix: remove redundant space.
Diffstat (limited to 'routers/user')
-rw-r--r--routers/user/auth_openid.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/user/auth_openid.go b/routers/user/auth_openid.go
index 2612f70a67..1351ca040b 100644
--- a/routers/user/auth_openid.go
+++ b/routers/user/auth_openid.go
@@ -359,11 +359,11 @@ func RegisterOpenIDPost(ctx *context.Context, cpt *captcha.Captcha, form auth.Si
}
}
- len := setting.MinPasswordLength
- if len < 256 {
- len = 256
+ length := setting.MinPasswordLength
+ if length < 256 {
+ length = 256
}
- password, err := generate.GetRandomString(len)
+ password, err := generate.GetRandomString(length)
if err != nil {
ctx.RenderWithErr(err.Error(), tplSignUpOID, form)
return