function shield_update_8002 in Shield 8
Convert user and pass config to credential provider config.
File
- ./
shield.install, line 21 - Contains install and update related functions for Shield.
Code
function shield_update_8002() {
$config = \Drupal::configFactory()
->getEditable('shield.settings');
$config
->set('credential_provider', 'shield')
->set('credentials.shield.user', $config
->get('user'))
->set('credentials.shield.pass', $config
->get('pass'))
->clear('user')
->clear('pass')
->save(TRUE);
}