refactor: append, build variable and type switch (#4940)
* refactor: append, build variable and type switch * fix: remove redundant space.
This commit is contained in:
parent
31557b1274
commit
743697a549
8 changed files with 42 additions and 46 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue