You are here

function ldap_server_check_plain in Lightweight Directory Access Protocol (LDAP) 7

1 call to ldap_server_check_plain()
ldap_server_tokenize_entry in ldap_servers/ldap_servers.functions.inc
Turn an ldap entry into a token array suitable for the t() function

File

ldap_servers/ldap_servers.functions.inc, line 295
collection of functions that don't belong in server object

Code

function ldap_server_check_plain($text, $attr_name = 'attribute', $detailed_watchdog_log = FALSE) {
  try {
    $text = @check_plain($text);
  } catch (Exception $e) {
    if ($detailed_watchdog_log) {
      $watchdog_tokens = array(
        '%attr_name' => $attr_name,
      );
      watchdog('ldap_servers', 'skipped tokenization of attribute %attr_name because the value would not pass check_plain function.', $watchdog_tokens, WATCHDOG_DEBUG);
    }
    $text = FALSE;
  }
  return $text;
}