You are here

public static function SimpleLdap::ldap_free_result in Simple LDAP 7

Same name and namespace in other branches
  1. 7.2 SimpleLdap.class.php \SimpleLdap::ldap_free_result()

Wrapper function for ldap_free_result().

@throw SimpleLdapException

Parameters

resource $result_identifier: LDAP search result identifier.

Return value

boolean TRUE on success.

1 call to SimpleLdap::ldap_free_result()
SimpleLdapServer::search in ./SimpleLdapServer.class.php
Search the LDAP server.

File

./SimpleLdap.class.php, line 650
Class defining base Simple LDAP functionallity.

Class

SimpleLdap
Simple LDAP class.

Code

public static function ldap_free_result($result_identifier) {

  // Devel debugging.
  if (variable_get('simple_ldap_devel', FALSE)) {
    dpm(__FUNCTION__);
  }

  // Wrapped function call.
  $return = @ldap_free_result($result_identifier);

  // Debugging.
  if (variable_get('simple_ldap_debug', FALSE)) {
    $message = __FUNCTION__ . '($result_identifier = @result_identifier) returns @return';
    $variables = array(
      '@result_identifier' => print_r($result_identifier, TRUE),
      '@return' => print_r($return, TRUE),
    );
    watchdog('simple_ldap', $message, $variables, WATCHDOG_DEBUG);
  }

  // Error handling.
  if ($return === FALSE) {
    throw new SimpleLdapException($result_identifier);
  }
  return $return;
}