function social_user_update_8001 in Open Social 10.1.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_user/social_user.install \social_user_update_8001()
- 8 modules/social_features/social_user/social_user.install \social_user_update_8001()
- 8.2 modules/social_features/social_user/social_user.install \social_user_update_8001()
- 8.3 modules/social_features/social_user/social_user.install \social_user_update_8001()
- 8.4 modules/social_features/social_user/social_user.install \social_user_update_8001()
- 8.5 modules/social_features/social_user/social_user.install \social_user_update_8001()
- 8.6 modules/social_features/social_user/social_user.install \social_user_update_8001()
- 8.7 modules/social_features/social_user/social_user.install \social_user_update_8001()
- 8.8 modules/social_features/social_user/social_user.install \social_user_update_8001()
- 10.3.x modules/social_features/social_user/social_user.install \social_user_update_8001()
- 10.0.x modules/social_features/social_user/social_user.install \social_user_update_8001()
- 10.2.x modules/social_features/social_user/social_user.install \social_user_update_8001()
Fix 2 wrongly saved view displays.
File
- modules/
social_features/ social_user/ social_user.install, line 24 - Install, update and uninstall functions for the social_user module.
Code
function social_user_update_8001(&$sandbox) {
/** @var \Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $conf_default */
$conf_default = \Drupal::getContainer()
->get('config.factory')
->getEditable('core.entity_view_display.user.user.default');
/** @var \Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $conf_full */
$conf_full = \Drupal::getContainer()
->get('config.factory')
->getEditable('core.entity_view_display.user.user.full');
/*
* For both these displays, the content is empty.
* In a previous version 3 subfields were exported into the root level of
* 'content'.
* This removes those fields that have no purpose and makes sure
* the update hook for Drupal 8.3.1 works properly.
*/
$conf_default
->set('content', [])
->save();
$conf_full
->set('content', [])
->save();
}