public function SyncMappingHelper::isSynced in Lightweight Directory Access Protocol (LDAP) 8.3
Given configuration of syncing, determine is a given sync should occur.
Parameters
string $attr_token: Attribute token such as [property.mail], or [field.ldap_user_puid_property].
array $prov_events: Provisioning events such as LdapUserAttributesInterface::EVENT_CREATE_DRUPAL_USER. Typically an array with one element.
int $direction: Either LdapConfiguration::PROVISION_TO_DRUPAL or LdapConfiguration::PROVISION_TO_LDAP.
Return value
bool If sync should occur.
File
- ldap_user/
src/ Helper/ SyncMappingHelper.php, line 71
Class
- SyncMappingHelper
- Helper class to process user field synchronisation mappings.
Namespace
Drupal\ldap_user\HelperCode
public function isSynced($attr_token, array $prov_events, $direction) {
$result = (bool) (isset($this->syncMapping[$direction][$attr_token]['prov_events']) && count(array_intersect($prov_events, $this->syncMapping[$direction][$attr_token]['prov_events'])));
return $result;
}