public function FieldProvider::loadAttributes in Lightweight Directory Access Protocol (LDAP) 8.4
LDAP attributes to alter.
Parameters
string $direction: Direction.
\Drupal\ldap_servers\Entity\Server $server: Server.
Return value
array All attributes.
File
- ldap_user/
src/ FieldProvider.php, line 110
Class
- FieldProvider
- Provides the basic and required fields needed for user mappings.
Namespace
Drupal\ldap_userCode
public function loadAttributes(string $direction, Server $server) : array {
$this->server = $server;
$this->direction = $direction;
if ($this->direction === self::PROVISION_TO_DRUPAL) {
$this
->addDn();
if ($this->server
->getUniquePersistentAttribute()) {
$this
->addPuidFields();
}
$triggers = $this->config
->get('drupalAcctProvisionTriggers');
if (!empty($triggers)) {
$this
->addBaseProperties();
}
}
if ($direction === self::PROVISION_TO_LDAP) {
$this
->addToLdapProvisioningFields();
}
$this
->addUserEntityFields();
$this
->exposeAvailableBaseFields();
$this
->loadUserDefinedMappings();
return $this->attributes;
}