diff --git a/invite.go b/invite.go index 0b1db9a..ea6d4de 100644 --- a/invite.go +++ b/invite.go @@ -96,17 +96,17 @@ func handleLostPassword(w http.ResponseWriter, r *http.Request) { } ldapConn, err := openNewUserLdap(config) if err != nil { - log.Printf(fmt.Sprintf("handleLostPassword : %v %v", err, ldapConn)) + log.Printf(fmt.Sprintf("handleLostPassword 99 : %v %v", err, ldapConn)) data.ErrorMessage = err.Error() } err = passwordLost(user, config, ldapConn) if err != nil { - log.Printf(fmt.Sprintf("handleLostPassword : %v %v", err, ldapConn)) + log.Printf(fmt.Sprintf("handleLostPassword 104 : %v %v", err, ldapConn)) data.ErrorMessage = err.Error() } else { err = ldapConn.Bind(config.NewUserDN, config.NewUserPassword) if err != nil { - log.Printf(fmt.Sprintf("handleLostPassword : %v %v", err, ldapConn)) + log.Printf(fmt.Sprintf("handleLostPassword 109 : %v %v", err, ldapConn)) data.ErrorMessage = err.Error() } else { data.Success = true diff --git a/model-user.go b/model-user.go index 377264b..c43a441 100644 --- a/model-user.go +++ b/model-user.go @@ -159,6 +159,8 @@ func modify(user User, config *ConfigFile, ldapConn *ldap.Conn) error { func passwd(user User, config *ConfigFile, ldapConn *ldap.Conn) error { passwordModifyRequest := ldap.NewPasswordModifyRequest(user.DN, "", user.Password) _, err := ldapConn.PasswordModify(passwordModifyRequest) + log.Printf(fmt.Sprintf("passwd 162 : %v %v", err, ldapConn)) + log.Printf(fmt.Sprintf("passwd 163 : %v", user)) return err }