Trying a utility file

This commit is contained in:
Chris Mann 2023-07-20 13:51:28 +02:00
parent 83648556d2
commit 7746dda87c

View file

@ -52,7 +52,7 @@ func handleInvitationCode(w http.ResponseWriter, r *http.Request) {
code := mux.Vars(r)["code"] code := mux.Vars(r)["code"]
code_id, code_pw := readCode(code) code_id, code_pw := readCode(code)
log.Printf(code_pw) // log.Printf(code_pw)
login := checkLogin(w, r) login := checkLogin(w, r)
@ -62,7 +62,7 @@ func handleInvitationCode(w http.ResponseWriter, r *http.Request) {
// } // }
inviteDn := config.InvitationNameAttr + "=" + code_id + "," + config.InvitationBaseDN inviteDn := config.InvitationNameAttr + "=" + code_id + "," + config.InvitationBaseDN
// err := l.Bind(inviteDn, code_pw) err := l.Bind(inviteDn, code_pw)
if err != nil { if err != nil {
templateInviteInvalidCode := getTemplate("invite_invalid_code.html") templateInviteInvalidCode := getTemplate("invite_invalid_code.html")
templateInviteInvalidCode.Execute(w, nil) templateInviteInvalidCode.Execute(w, nil)