You are here

function LDAPInterface::connect in LDAP integration 5

Same name and namespace in other branches
  1. 5.2 ldap_integration/LDAPInterface.php \LDAPInterface::connect()
  2. 6 includes/LDAPInterface.inc \LDAPInterface::connect()

File

ldap_integration/LDAPInterface.php, line 93

Class

LDAPInterface

Code

function connect($dn = '', $pass = '') {
  $ret = FALSE;

  // http://drupal.org/node/164049
  // If a connection already exists, it should be terminated
  $this
    ->disconnect();
  if ($this
    ->connectAndBind($dn, $pass)) {
    $ret = TRUE;
  }
  return $ret;
}