mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 01:02:17 +00:00
feat(login): show profile (#485)
* profile data * fix scripts * fix image paths * feat: show profile (with image) when possible * fix profile image width
This commit is contained in:
@@ -25,6 +25,7 @@ type initPasswordFormData struct {
|
||||
|
||||
type initPasswordData struct {
|
||||
baseData
|
||||
profileData
|
||||
Code string
|
||||
UserID string
|
||||
PasswordPolicyDescription string
|
||||
@@ -93,9 +94,10 @@ func (l *Login) renderInitPassword(w http.ResponseWriter, r *http.Request, authR
|
||||
}
|
||||
|
||||
data := initPasswordData{
|
||||
baseData: l.getBaseData(r, authReq, "Init Password", errType, errMessage),
|
||||
UserID: userID,
|
||||
Code: code,
|
||||
baseData: l.getBaseData(r, authReq, "Init Password", errType, errMessage),
|
||||
profileData: l.getProfileData(authReq),
|
||||
UserID: userID,
|
||||
Code: code,
|
||||
}
|
||||
policy, description, _ := l.getPasswordComplexityPolicyByUserID(r, userID)
|
||||
if policy != nil {
|
||||
@@ -118,13 +120,6 @@ func (l *Login) renderInitPassword(w http.ResponseWriter, r *http.Request, authR
|
||||
}
|
||||
|
||||
func (l *Login) renderInitPasswordDone(w http.ResponseWriter, r *http.Request, authReq *model.AuthRequest) {
|
||||
loginName := ""
|
||||
if authReq != nil {
|
||||
loginName = authReq.LoginName
|
||||
}
|
||||
data := userData{
|
||||
baseData: l.getBaseData(r, authReq, "Password Init Done", "", ""),
|
||||
LoginName: loginName,
|
||||
}
|
||||
data := l.getUserData(r, authReq, "Password Init Done", "", "")
|
||||
l.renderer.RenderTemplate(w, r, l.renderer.Templates[tmplInitPasswordDone], data, nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user