public function LdapUserConf::provisionEnabled in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_user/LdapUserConf.class.php \LdapUserConf::provisionEnabled()
given a $prov_event determine if ldap user configuration supports it. this is overall, not per field synching configuration
Parameters
enum $direction LDAP_USER_PROV_DIRECTION_TO_DRUPAL_USER or LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY:
enum $prov_event: LDAP_USER_EVENT_SYNCH_TO_DRUPAL_USER, LDAP_USER_EVENT_CREATE_DRUPAL_USER LDAP_USER_EVENT_SYNCH_TO_LDAP_ENTRY LDAP_USER_EVENT_CREATE_LDAP_ENTRY LDAP_USER_EVENT_LDAP_ASSOCIATE_DRUPAL_ACCT LDAP_USER_EVENT_ALL
enum $action 'synch', 'provision', 'delete_ldap_entry', 'delete_drupal_entry', 'cancel_drupal_entry':
Return value
boolean
File
- ldap_user/
LdapUserConf.class.php, line 455
Class
Code
public function provisionEnabled($direction, $provision_trigger) {
$result = FALSE;
if ($direction == LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY) {
if (!$this->ldapEntryProvisionServer) {
$result = FALSE;
}
else {
$result = in_array($provision_trigger, $this->ldapEntryProvisionTriggers);
}
}
elseif ($direction == LDAP_USER_PROV_DIRECTION_TO_DRUPAL_USER) {
if (!$this->drupalAcctProvisionServer) {
$result = FALSE;
}
else {
$result = in_array($provision_trigger, $this->drupalAcctProvisionTriggers);
}
}
return $result;
}