You are here

function LDAPInterface::getOption in LDAP integration 5

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

File

ldap_integration/LDAPInterface.php, line 58

Class

LDAPInterface

Code

function getOption($option) {
  $ret = '';
  switch ($option) {
    case 'version':
      $ret = -1;
      ldap_get_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, $ret);
      break;
    case 'name':
      $ret = $this->name;
      break;
    case 'port':
      $ret = $this->port;
      break;
    case 'tls':
      $ret = $this->tls;
      break;
    case 'encrypted':
      $ret = $this->encrypted;
      break;
    case 'user_attr':
      $ret = $this->user_attr;
      break;
    case 'attr_filter':
      $ret = $this->attr_filter;
      break;
    case 'basedn':
      $ret = $this->basedn;
      break;
    case 'mail_attr':
      $ret = $this->mail_attr;
      break;
  }
  return $ret;
}