You are here

public function SimpleLdap::freeResult in Simple LDAP 8

Wrapper function for ldap_free_result().

Parameters

resource $result_identifier: LDAP search result identifier.

Return value

boolean TRUE on success.

Throws

SimpleLdapException

File

src/SimpleLdap.php, line 448

Class

SimpleLdap
A wrapper for PHP's LDAP functions, with associated helper methods.

Namespace

Drupal\simple_ldap

Code

public function freeResult($result_identifier) {
  $return = @ldap_free_result($result_identifier);

  // Error handling.
  if ($return === FALSE) {
    throw new SimpleLdapException('ldap_free_result wrapper: ', $result_identifier);
  }
  return $return;
}