From 568f9f1f5a440998dc411230b19a04885aa68dc4 Mon Sep 17 00:00:00 2001 From: Chris Mann Date: Sun, 23 Jul 2023 13:39:05 +0200 Subject: [PATCH] G Pas --- gpas.go | 2 +- profile.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gpas.go b/gpas.go index 0696a74..d5b4e62 100644 --- a/gpas.go +++ b/gpas.go @@ -86,7 +86,7 @@ func passwordLost(user User, config *ConfigFile, ldapConn *ldap.Conn) error { func passwordFound(user User, config *ConfigFile, ldapConn *ldap.Conn) (string, error) { l, err := openLdap(config) if err != nil { - return false, err + return "", err } if user.DN == "" && user.UID != "" { user.DN = "uid=" + user.UID + ",ou=invitations,dc=resdigita,dc=org" diff --git a/profile.go b/profile.go index ef5c359..84e7af2 100644 --- a/profile.go +++ b/profile.go @@ -144,7 +144,7 @@ func handleFoundPassword(w http.ResponseWriter, r *http.Request) { Password: codeArray[1], DN: "uid=" + codeArray[0] + ",ou=invitations,dc=resdigita,dc=org", } - dn, err = passwordFound(user, config, ldapConn) + user.SeeAlso, err = passwordFound(user, config, ldapConn) if err != nil { log.Printf("handleFoundPassword / passwordFound %v", err) log.Printf("handleFoundPassword / passwordFound %v", err)