public static function SimpleLdap::ldap_start_tls in Simple LDAP 7.2
Same name and namespace in other branches
- 7 SimpleLdap.class.php \SimpleLdap::ldap_start_tls()
Wrapper function for ldap_start_tls().
@throw SimpleLdapException
Parameters
resource $link: An LDAP link identifier.
Return value
boolean TRUE on success.
1 call to SimpleLdap::ldap_start_tls()
- SimpleLdapServer::connect in ./
SimpleLdapServer.class.php - Connect to the LDAP server.
File
- ./
SimpleLdap.class.php, line 1249 - Class defining base Simple LDAP functionallity.
Class
- SimpleLdap
- Simple LDAP class.
Code
public static function ldap_start_tls($link) {
// Devel debugging.
if (variable_get('simple_ldap_devel', FALSE)) {
dpm(__FUNCTION__);
}
// Wrapped function call.
$return = @ldap_start_tls($link);
// Debugging.
if (variable_get('simple_ldap_debug', FALSE)) {
$message = __FUNCTION__ . '($link = @link) returns @return';
$variables = array(
'@link' => print_r($link, TRUE),
'@return' => print_r($return, TRUE),
);
watchdog('simple_ldap', $message, $variables, WATCHDOG_DEBUG);
}
// Error handling.
if ($return === FALSE) {
throw new SimpleLdapException($link);
}
return $return;
}