function ldap_user_module_preinstall in Lightweight Directory Access Protocol (LDAP) 8.4
Same name and namespace in other branches
- 8.3 ldap_user/ldap_user.install \ldap_user_module_preinstall()
Implements hook_module_preinstall().
File
- ldap_user/
ldap_user.install, line 20
Code
function ldap_user_module_preinstall($module) {
if ($module === 'ldap_user') {
$type = \Drupal::entityTypeManager()
->getDefinition('user');
$fields = ldap_user_entity_base_field_info($type);
foreach ($fields as $name => $data) {
\Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition($name, 'user', 'ldap_user', $data);
}
}
}