diff --git a/internal/api/ui/login/init_user_handler.go b/internal/api/ui/login/init_user_handler.go index c058c6243..fb4b8b845 100644 --- a/internal/api/ui/login/init_user_handler.go +++ b/internal/api/ui/login/init_user_handler.go @@ -121,10 +121,14 @@ func (l *Login) renderInitUser(w http.ResponseWriter, r *http.Request, authReq * baseData: l.getBaseData(r, authReq, "InitUser.Title", "InitUser.Description", errID, errMessage), profileData: l.getProfileData(authReq), UserID: userID, - LoginName: loginName, Code: code, PasswordSet: passwordSet, } + // if the user clicked on the link in the mail, we need to make sure the loginName is rendered + if authReq == nil { + data.LoginName = loginName + data.UserName = loginName + } policy := l.getPasswordComplexityPolicyByUserID(r, userID) if policy != nil { data.MinLength = policy.MinLength diff --git a/internal/api/ui/login/static/templates/change_password.html b/internal/api/ui/login/static/templates/change_password.html index 45eacb3ab..506c10778 100644 --- a/internal/api/ui/login/static/templates/change_password.html +++ b/internal/api/ui/login/static/templates/change_password.html @@ -12,7 +12,7 @@ {{ .CSRF }} - +