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

@@ -6,7 +6,6 @@ import (
"strconv"
"github.com/zitadel/zitadel/internal/domain"
caos_errs "github.com/zitadel/zitadel/internal/errors"
)
@@ -138,6 +137,12 @@ func (l *Login) renderInitUser(w http.ResponseWriter, r *http.Request, 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[tmplInitUser], data, nil)
}