function social_auth_extra_update_8001 in Open Social 8.5
Same name and namespace in other branches
- 8.9 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
- 8 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
- 8.2 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
- 8.3 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
- 8.4 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
- 8.6 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
- 8.7 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
- 8.8 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
Change 'edit account' to 'settings' in registration mail.
File
- modules/
custom/ social_auth_extra/ social_auth_extra.install, line 11 - Contains social_auth_extra.instal.
Code
function social_auth_extra_update_8001(&$sandbox) {
// Get config.
$config = \Drupal::service('config.factory')
->getEditable('social_auth_extra.mail');
// Fetch the body field.
$body = $config
->get('email_social_login.body');
// Replace 'edit account' with 'settings'.
$new_body = str_replace('edit account', 'settings', $body);
// And save it.
$config
->set('email_social_login.body', $new_body)
->save();
}