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 {
|
// if login == nil {
|
||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
|
l, _ := ldap.DialURL(config.LdapServerAddr)
|
||||||
handleNewAccount(w, r, login.conn, login.Info.DN)
|
l.Bind(config.NewUserDN, config.NewUserPassword)
|
||||||
|
handleNewAccount(w, r, l, config.NewUserDN)
|
||||||
}
|
}
|
||||||
|
|
||||||
// New account creation using code
|
// 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 {
|
func addNewUser(newUser NewUser, config *ConfigFile) bool {
|
||||||
log.Printf(fmt.Sprint("Adding New User"))
|
log.Printf(fmt.Sprint("Adding New User"))
|
||||||
l := openLdap(*config)
|
|
||||||
l.Bind(config.NewUserDN, config.NewUserPassword)
|
|
||||||
// l.Bind(config.)
|
// l.Bind(config.)
|
||||||
dn := newUser.DN
|
dn := newUser.DN
|
||||||
req := ldap.NewAddRequest(dn, nil)
|
req := ldap.NewAddRequest(dn, nil)
|
||||||
|
|
Loading…
Reference in a new issue