Implementing Activate User
This commit is contained in:
parent
c91bb08340
commit
8468cb3856
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
3
utils.go
3
utils.go
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue