mirror of
https://gitlab.unicamp.br/infimecc_drupal11_modules/base_site_config.git
synced 2026-05-01 14:00:41 -03:00
Compare commits
2 Commits
c872fce60a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f8664a059 | |||
| c74a7edfa0 |
@@ -30,3 +30,29 @@ function base_site_config_install() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds field_user_mathscinetid LDAP sync mapping.
|
||||||
|
*/
|
||||||
|
function base_site_config_update_10001() {
|
||||||
|
$config = \Drupal::configFactory()->getEditable('ldap_user.settings');
|
||||||
|
$mappings = $config->get('ldapUserSyncMappings');
|
||||||
|
|
||||||
|
if (!isset($mappings['drupal']['field-field_user_mathscinetid'])) {
|
||||||
|
$mappings['drupal']['field-field_user_mathscinetid'] = [
|
||||||
|
'ldap_attr' => '[mathSciNetId]',
|
||||||
|
'user_attr' => '[field.field_user_mathscinetid]',
|
||||||
|
'convert' => FALSE,
|
||||||
|
'user_tokens' => '',
|
||||||
|
'config_module' => 'ldap_user',
|
||||||
|
'prov_module' => 'site_users',
|
||||||
|
'prov_events' => [
|
||||||
|
'create_drupal_user',
|
||||||
|
'sync_to_drupal_user',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
$config->set('ldapUserSyncMappings', $mappings)->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
return t('LDAP sync mapping for field_user_mathscinetid added.');
|
||||||
|
}
|
||||||
|
|||||||
10
composer.json
Normal file
10
composer.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "imecc/base_site_config",
|
||||||
|
"description": "Configurações básicas específicas para o site do IMECC.",
|
||||||
|
"type": "drupal-module",
|
||||||
|
"license": "GPL-2.0-or-later",
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.1",
|
||||||
|
"drupal/core": "^10.3 || ^11"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -96,4 +96,14 @@ ldapUserSyncMappings:
|
|||||||
prov_events:
|
prov_events:
|
||||||
- create_drupal_user
|
- create_drupal_user
|
||||||
- sync_to_drupal_user
|
- sync_to_drupal_user
|
||||||
|
field-field_user_mathscinetid:
|
||||||
|
ldap_attr: '[mathSciNetId]'
|
||||||
|
user_attr: '[field.field_user_mathscinetid]'
|
||||||
|
convert: false
|
||||||
|
user_tokens: ''
|
||||||
|
config_module: ldap_user
|
||||||
|
prov_module: site_users
|
||||||
|
prov_events:
|
||||||
|
- create_drupal_user
|
||||||
|
- sync_to_drupal_user
|
||||||
ldap: { }
|
ldap: { }
|
||||||
|
|||||||
Reference in New Issue
Block a user