You are here

private function LdapUserConfAdmin::provisionEventConfigurable in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_user/LdapUserConfAdmin.class.php \LdapUserConfAdmin::provisionEventConfigurable()

Is a particular synch method viable for a given mapping? That is, Can it be enabled in the UI by admins?

Parameters

int $prov_event:

array $mapping: is array of mapping configuration.

Return value

bool

1 call to LdapUserConfAdmin::provisionEventConfigurable()
LdapUserConfAdmin::addSynchFormRow in ldap_user/LdapUserConfAdmin.class.php
Add mapping form row to ldap user provisioning mapping admin form table.

File

ldap_user/LdapUserConfAdmin.class.php, line 932

Class

LdapUserConfAdmin

Code

private function provisionEventConfigurable($prov_event, $mapping = NULL) {
  if ($mapping) {
    if ($prov_event == LDAP_USER_EVENT_CREATE_LDAP_ENTRY || $prov_event == LDAP_USER_EVENT_SYNCH_TO_LDAP_ENTRY) {
      $configurable = (bool) (!isset($mapping['configurable_to_ldap']) || $mapping['configurable_to_ldap']);
    }
    elseif ($prov_event == LDAP_USER_EVENT_CREATE_DRUPAL_USER || $prov_event == LDAP_USER_EVENT_SYNCH_TO_DRUPAL_USER) {
      $configurable = (bool) (!isset($mapping['configurable_to_drupal']) || $mapping['configurable_to_drupal']);
    }
  }
  else {
    $configurable = TRUE;
  }
  return $configurable;
}