function social_profile_update_8003 in Open Social 8.7
Same name and namespace in other branches
- 8.9 modules/social_features/social_profile/social_profile.install \social_profile_update_8003()
- 8 modules/social_features/social_profile/social_profile.install \social_profile_update_8003()
- 8.2 modules/social_features/social_profile/social_profile.install \social_profile_update_8003()
- 8.3 modules/social_features/social_profile/social_profile.install \social_profile_update_8003()
- 8.4 modules/social_features/social_profile/social_profile.install \social_profile_update_8003()
- 8.5 modules/social_features/social_profile/social_profile.install \social_profile_update_8003()
- 8.6 modules/social_features/social_profile/social_profile.install \social_profile_update_8003()
- 8.8 modules/social_features/social_profile/social_profile.install \social_profile_update_8003()
- 10.3.x modules/social_features/social_profile/social_profile.install \social_profile_update_8003()
- 10.0.x modules/social_features/social_profile/social_profile.install \social_profile_update_8003()
- 10.1.x modules/social_features/social_profile/social_profile.install \social_profile_update_8003()
- 10.2.x modules/social_features/social_profile/social_profile.install \social_profile_update_8003()
Add social_profile.settings config. Update permissions for SM role.
File
- modules/
social_features/ social_profile/ social_profile.install, line 190 - Install, update and uninstall functions for the social_profile module.
Code
function social_profile_update_8003(&$sandbox) {
_social_profile_set_default_config();
// Add permission to view profile email and administer profile settings for
// sitemanager role.
$roles = Role::loadMultiple();
$permissions = [
'administer profile settings',
'view profile email',
];
/** @var \Drupal\user\Entity\Role $role */
foreach ($roles as $role) {
if ($role
->id() === 'sitemanager') {
user_role_grant_permissions($role
->id(), $permissions);
}
}
}