function comment_post_update_add_ip_address_setting in Drupal 8
Add comment settings.
File
- core/
modules/ comment/ comment.post_update.php, line 43 - Post update functions for the comment module.
Code
function comment_post_update_add_ip_address_setting() {
$config_factory = \Drupal::configFactory();
$settings = $config_factory
->getEditable('comment.settings');
$settings
->set('log_ip_addresses', TRUE)
->save(TRUE);
}