1 contact.install contact_update_1003()

Set default value for new 'Enable personal contact forms' setting for existing sites.

Related topics

File

core/modules/contact/contact.install, line 96
Install, update and uninstall functions for the contact module.

Code

function contact_update_1003() {
  $config = config('contact.settings');
  if ($config->get('personal') === NULL) {
    $config->set('personal', 1);
    $config->save();
  }
}