ldap包使用v3版本

This commit is contained in:
gsw945 2022-09-02 11:08:59 +08:00
parent 2c07195f29
commit 4c6ef05fbd

View File

@ -75,7 +75,7 @@ func AddMember(account, password string) error {
defer lc.Close()
user := fmt.Sprintf("cn=%s,dc=minho,dc=com", account)
member := ldap.NewAddRequest(user)
member := ldap.NewAddRequest(user, []ldap.Control{})
member.Attribute("mail", []string{"longfei6671@163.com"})