public function LdapAuthorizationConsumerConf::__construct in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_authorization/LdapAuthorizationConsumerConf.class.php \LdapAuthorizationConsumerConf::__construct()
- 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 58 - Class to encapsulate an ldap entry to authorization consumer ids mapping configuration.
Class
- LdapAuthorizationConsumerConf
- LDAP Authorization Consumer Configuration.
Code
public 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', [
'%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.
}