You are here

public function LdapUserConf::isSynched in Lightweight Directory Access Protocol (LDAP) 7.2

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

Given configuration of synching, determine is a given synch should occur.

Parameters

string $attr_token: e.g. [property.mail], [field.ldap_user_puid_property].

array $prov_events: e.g. array(LDAP_USER_EVENT_CREATE_DRUPAL_USER). typically array with 1 element.

scalar $direction: LDAP_USER_PROV_DIRECTION_TO_DRUPAL_USER or LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY.

Return value

bool

2 calls to LdapUserConf::isSynched()
LdapUserConf::drupalUserToLdapEntry in ldap_user/LdapUserConf.class.php
Populate ldap entry array for provisioning.
LdapUserConf::entryToUserEdit in ldap_user/LdapUserConf.class.php
Populate $user edit array (used in hook_user_save, hook_user_update, etc) ... should not assume all attribues are present in ldap entry.

File

ldap_user/LdapUserConf.class.php, line 1383

Class

LdapUserConf

Code

public function isSynched($attr_token, $prov_events, $direction) {
  $result = (bool) (isset($this->synchMapping[$direction][$attr_token]['prov_events']) && count(array_intersect($prov_events, $this->synchMapping[$direction][$attr_token]['prov_events'])));
  if (!$result) {
    if (isset($this->synchMapping[$direction][$attr_token])) {
    }
    else {
    }
  }
  return $result;
}