You are here

public function DrupalUserProcessor::drupalUserUpdate in Lightweight Directory Access Protocol (LDAP) 8.4

Callback for hook_ENTITY_TYPE_update().

Parameters

\Drupal\user\UserInterface $account: The Drupal user.

File

ldap_user/src/Processor/DrupalUserProcessor.php, line 405

Class

DrupalUserProcessor
Handles processing of a user from LDAP to Drupal.

Namespace

Drupal\ldap_user\Processor

Code

public function drupalUserUpdate(UserInterface $account) : void {
  $this->account = $account;
  if ($this
    ->excludeUser($this->account)) {
    return;
  }
  $server = $this->config
    ->get('drupalAcctProvisionServer');
  $triggers = $this->config
    ->get('drupalAcctProvisionTriggers');
  if ($server && in_array(self::PROVISION_DRUPAL_USER_ON_USER_UPDATE_CREATE, $triggers, TRUE)) {
    $this
      ->syncToDrupalAccount();
  }
}