//Connect used to connect and bind to server.
Connect used to connect and bind to server.
// Connect used to connect and bind to server .
func (lc *HelperLDAP) Connect() liberr.Error {
	if lc == nil {
		return ErrorEmptyParams.Error(nil)
	}
	if err := lc.AuthUser(lc.bindDN, lc.bindPass); err != nil {
		return err
	}
	lc.getLogEntry(liblog.DebugLevel, "ldap bind success").FieldAdd("bind.dn", lc.bindDN).Log()
	return nil
}
func ( lc * HelperLDAP ) Connect ( ) liberr . Error { if lc == nil { return ErrorEmptyParams . Error ( nil ) } if err := lc . AuthUser ( lc . bindDN , lc . bindPass ) ; err != nil { return err } lc . getLogEntry ( liblog . DebugLevel , " " ) . FieldAdd ( " " , lc . bindDN ) . Log ( ) return nil }
Connect used to connect and bind to server.
Connect used to connect and bind to server .