private function DrupalUserProcessor::ldapContextToProvDirection in Lightweight Directory Access Protocol (LDAP) 8.3
Return context to provision direction.
Converts the more general ldap_context string to its associated LDAP user prov direction.
Parameters
string|null $ldapContext: The relevant context.
Return value
string The provisioning direction.
1 call to DrupalUserProcessor::ldapContextToProvDirection()
- DrupalUserProcessor::alterUserAttributes in ldap_user/
src/ Processor/ DrupalUserProcessor.php - Alter the user's attributes.
File
- ldap_user/
src/ Processor/ DrupalUserProcessor.php, line 821
Class
- DrupalUserProcessor
- Handles processing of a user from LDAP to Drupal.
Namespace
Drupal\ldap_user\ProcessorCode
private function ldapContextToProvDirection($ldapContext = NULL) {
switch ($ldapContext) {
case 'ldap_user_prov_to_drupal':
$result = self::PROVISION_TO_DRUPAL;
break;
case 'ldap_user_prov_to_ldap':
case 'ldap_user_delete_drupal_user':
$result = self::PROVISION_TO_LDAP;
break;
// Provisioning is can happen in both directions in most contexts.
case 'ldap_user_insert_drupal_user':
case 'ldap_user_update_drupal_user':
case 'ldap_authentication_authenticate':
case 'ldap_user_disable_drupal_user':
$result = self::PROVISION_TO_ALL;
break;
default:
$result = self::PROVISION_TO_ALL;
break;
}
return $result;
}