You are here

function LdapAuthorizationConsumerConf::__construct in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_authorization/LdapAuthorizationConsumerConf.class.php \LdapAuthorizationConsumerConf::__construct()
  2. 7.2 ldap_authorization/LdapAuthorizationConsumerConf.class.php \LdapAuthorizationConsumerConf::__construct()

Constructor Method

1 call to LdapAuthorizationConsumerConf::__construct()
LdapAuthorizationConsumerConfAdmin::__construct in ldap_authorization/LdapAuthorizationConsumerConfAdmin.class.php
Constructor Method
1 method overrides LdapAuthorizationConsumerConf::__construct()
LdapAuthorizationConsumerConfAdmin::__construct in ldap_authorization/LdapAuthorizationConsumerConfAdmin.class.php
Constructor Method

File

ldap_authorization/LdapAuthorizationConsumerConf.class.php, line 75
class to encapsulate an ldap entry to authorization consumer ids mapping configuration

Class

LdapAuthorizationConsumerConf
LDAP Authorization Consumer Configuration

Code

function __construct(&$consumer, $_new = FALSE, $_sid = NULL) {
  $this->consumer = $consumer;
  $this->consumerType = $consumer->consumerType;
  if ($_new) {
    $this->inDatabase = FALSE;
  }
  else {
    $this->inDatabase = TRUE;
    $this
      ->loadFromDb();
  }

  // default value for deriveFromEntryAttrMatchingUserAttr set up this way for backward compatibility in 1.0 branch,
  // make deriveFromEntryAttrMatchingUserAttr default to dn in 2.0 branch.
  if ($this->deriveFromEntryAttrMatchingUserAttr) {
    $this->deriveFromEntryAttrMatchingUserAttrUndefined = FALSE;
  }
  else {
    $this->deriveFromEntryAttrMatchingUserAttr = 'dn';
    $this->deriveFromEntryAttrMatchingUserAttrUndefined = TRUE;
  }
  $this->normalizedMappings = $consumer
    ->normalizeMappings($this->mappings);
}