You are here

function social_swiftmail_update_8003 in Open Social 10.0.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_swiftmail/social_swiftmail.install \social_swiftmail_update_8003()
  2. 8.7 modules/social_features/social_swiftmail/social_swiftmail.install \social_swiftmail_update_8003()
  3. 8.8 modules/social_features/social_swiftmail/social_swiftmail.install \social_swiftmail_update_8003()
  4. 10.3.x modules/social_features/social_swiftmail/social_swiftmail.install \social_swiftmail_update_8003()
  5. 10.1.x modules/social_features/social_swiftmail/social_swiftmail.install \social_swiftmail_update_8003()
  6. 10.2.x modules/social_features/social_swiftmail/social_swiftmail.install \social_swiftmail_update_8003()

Allow using the "Mail HTML" text format by the logged user.

File

modules/social_features/social_swiftmail/social_swiftmail.install, line 97
Install and update hooks for Social Swiftmailer.

Code

function social_swiftmail_update_8003() {
  $roles = \Drupal::entityQuery('user_role')
    ->condition('id', [
    'authenticated',
    'contentmanager',
  ], 'IN')
    ->execute();
  foreach ($roles as $role) {
    user_role_grant_permissions($role, [
      'use text format mail_html',
    ]);
  }
}