fix: read custom texts for pages called directly form mail link (#4255)

* fix: read custom texts for pages called directly form mail link

* log errors
This commit is contained in:
Livio Spring
2022-08-26 10:53:11 +02:00
committed by GitHub
parent e1a981928c
commit 64f589c435
4 changed files with 39 additions and 2 deletions

View File

@@ -98,6 +98,12 @@ func (l *Login) renderMailVerification(w http.ResponseWriter, r *http.Request, a
profileData: l.getProfileData(authReq),
}
translator := l.getTranslator(r.Context(), authReq)
if authReq == nil {
user, err := l.query.GetUserByID(r.Context(), false, userID)
if err == nil {
l.customTexts(r.Context(), translator, user.ResourceOwner)
}
}
l.renderer.RenderTemplate(w, r, translator, l.renderer.Templates[tmplMailVerification], data, nil)
}