fix: render login (#432)

This commit is contained in:
Livio Amstutz 2020-07-09 17:44:35 +02:00 committed by GitHub
parent 5add7eae6d
commit bc5f16d5b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,9 +56,13 @@ func (l *Login) renderLogin(w http.ResponseWriter, r *http.Request, authReq *mod
if err != nil { if err != nil {
errMessage = l.getErrorMessage(r, err) errMessage = l.getErrorMessage(r, err)
} }
loginName := ""
if authReq != nil {
loginName = authReq.LoginName
}
data := userData{ data := userData{
baseData: l.getBaseData(r, authReq, "Login", errType, errMessage), baseData: l.getBaseData(r, authReq, "Login", errType, errMessage),
LoginName: authReq.LoginName, LoginName: loginName,
} }
l.renderer.RenderTemplate(w, r, l.renderer.Templates[tmplLogin], data, nil) l.renderer.RenderTemplate(w, r, l.renderer.Templates[tmplLogin], data, nil)
} }