function salesforce_update_8401 in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 salesforce.install \salesforce_update_8401()
Enable salesforce_oauth module and purge legacy settings.
File
- ./
salesforce.install, line 341 - Salesforce install file.
Code
function salesforce_update_8401() {
// Enable salesforce_oauth module.
\Drupal::service('module_installer')
->install([
'salesforce_oauth',
]);
// Purge old stateful values and config.
\Drupal::configFactory()
->getEditable('salesforce.settings')
->clear('consumer_key')
->clear('consumer_secret')
->clear('login_url')
->save();
\Drupal::state()
->deleteMultiple([
'salesforce.access_token',
'salesforce.refresh_token',
'salesforce.identity',
'salesforce.instance_url',
]);
}