You are here

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

Same name and namespace in other branches
  1. 7.2 ldap_authorization/LdapAuthorizationConsumerConf.class.php \LdapAuthorizationConsumerConf::__construct()
  2. 7 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 56
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;
    $exists = $this
      ->loadFromDb();
    if (!$exists) {
      watchdog('ldap_authorization', 'failed to load existing %consumer object', array(
        '%consumer' => $consumer->consumerType,
      ), WATCHDOG_ERROR);
    }
  }

  // default value for deriveFromEntryAttrMatchingUserAttr set up this way for backward compatibility in 1.0 branch,
  // make deriveFromEntryAttrMatchingUserAttr default to dn in 2.0 branch.
}