function social_swiftmail_update_8003 in Open Social 10.0.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_swiftmail/social_swiftmail.install \social_swiftmail_update_8003()
- 8.7 modules/social_features/social_swiftmail/social_swiftmail.install \social_swiftmail_update_8003()
- 8.8 modules/social_features/social_swiftmail/social_swiftmail.install \social_swiftmail_update_8003()
- 10.3.x modules/social_features/social_swiftmail/social_swiftmail.install \social_swiftmail_update_8003()
- 10.1.x modules/social_features/social_swiftmail/social_swiftmail.install \social_swiftmail_update_8003()
- 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',
]);
}
}