You are here

function social_auth_extra_update_8001 in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
  2. 8.2 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
  3. 8.3 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
  4. 8.4 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
  5. 8.5 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
  6. 8.6 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
  7. 8.7 modules/custom/social_auth_extra/social_auth_extra.install \social_auth_extra_update_8001()
  8. 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();
}