You are here

protected function LdapUserManager::applyModificationsToEntry in Lightweight Directory Access Protocol (LDAP) 8.4

Apply modifications to entry.

@todo / @FIXME: This is not called.

Parameters

\Symfony\Component\Ldap\Entry $entry: LDAP Entry.

\Symfony\Component\Ldap\Entry $current: LDAP Entry.

Overrides LdapBaseManager::applyModificationsToEntry

File

ldap_servers/src/LdapUserManager.php, line 111

Class

LdapUserManager
LDAP User Manager.

Namespace

Drupal\ldap_servers

Code

protected function applyModificationsToEntry(Entry $entry, Entry $current) : void {
  if ($entry
    ->hasAttribute('unicodePwd', FALSE) && $this->server
    ->get('type') === 'ad') {
    $converted = $this
      ->convertPasswordForActiveDirectoryUnicodePwd($entry
      ->getAttribute('unicodePwd', FALSE)[0]);
    $entry
      ->setAttribute('unicodePwd', [
      $converted,
    ]);
  }
  parent::applyModificationsToEntry($entry, $current);
}