//AuthUser used to test bind given user uid and password.
AuthUser used to test bind given user uid and password.
// AuthUser used to test bind given user uid and password .
func (lc *HelperLDAP) AuthUser(username, password string) liberr.Error {
	if lc == nil {
		return ErrorEmptyParams.Error(nil)
	}
	if err := lc.connect(); err != nil {
		return err
	}
	if username == "" || password == "" {
		return ErrorEmptyParams.Error(nil)
	}
	err := lc.conn.Bind(username, password)
	return ErrorLDAPBind.Iferror(err)
}
func ( lc * HelperLDAP ) AuthUser ( username , password string ) liberr . Error { if lc == nil { return ErrorEmptyParams . Error ( nil ) } if err := lc . connect ( ) ; err != nil { return err } if username == " " || password == " " { return ErrorEmptyParams . Error ( nil ) } err := lc . conn . Bind ( username , password ) return ErrorLDAPBind . Iferror ( err ) }
AuthUser used to test bind given user uid and password.
AuthUser used to test bind given user uid and password .