Implementing Activate User

This commit is contained in:
Chris Mann 2023-07-21 09:22:38 +02:00
parent c91bb08340
commit 8468cb3856
2 changed files with 4 additions and 4 deletions

View file

@ -42,8 +42,9 @@ func handleInviteNewAccount(w http.ResponseWriter, r *http.Request) {
// if login == nil {
// return
// }
handleNewAccount(w, r, login.conn, login.Info.DN)
l, _ := ldap.DialURL(config.LdapServerAddr)
l.Bind(config.NewUserDN, config.NewUserPassword)
handleNewAccount(w, r, l, config.NewUserDN)
}
// New account creation using code

View file

@ -42,8 +42,7 @@ func suggestPassword() string {
func addNewUser(newUser NewUser, config *ConfigFile) bool {
log.Printf(fmt.Sprint("Adding New User"))
l := openLdap(*config)
l.Bind(config.NewUserDN, config.NewUserPassword)
// l.Bind(config.)
dn := newUser.DN
req := ldap.NewAddRequest(dn, nil)