public function Update360::enableUserPictures in Lightning Core 8.4
Same name and namespace in other branches
- 8.5 src/Update/Update360.php \Drupal\lightning_core\Update\Update360::enableUserPictures()
- 8.3 src/Update/Update360.php \Drupal\lightning_core\Update\Update360::enableUserPictures()
Enables avatars for user accounts.
@update
@ask Do you want to enable pictures for user accounts?
File
- src/
Update/ Update360.php, line 48
Class
- Update360
- Contains optional configuration updates targeting Lightning Core 3.6.0.
Namespace
Drupal\lightning_core\UpdateCode
public function enableUserPictures() {
$this->moduleInstaller
->install([
'image',
]);
$config = Config::forModule('lightning_core')
->optional();
$config
->getEntity('field_storage_config', 'user.user_picture')
->save();
$config
->getEntity('field_config', 'user.user.user_picture')
->save();
$config
->getEntity('entity_view_display', 'user.user.compact')
->save();
}