You are here

function webform_civicrm_update_7302 in Webform CiviCRM Integration 7.4

Same name and namespace in other branches
  1. 7.5 webform_civicrm.install \webform_civicrm_update_7302()
  2. 7.3 webform_civicrm.install \webform_civicrm_update_7302()

This update will modify all "Existing Contact" fields to enable the "Enforce Permissions" setting. Earlier versions of this module did not make it sufficiently clear that this setting should almost always be enabled, and contained bugs that were sometimes worked-around by disabling the setting. If you have configured custom contact permissions that maintain security without needing "Enforce Permissions" to be enabled, please review your webforms and disable it as needed (with care).

File

./webform_civicrm.install, line 704
Webform CiviCRM module's install, uninstall and upgrade code.

Code

function webform_civicrm_update_7302() {
  db_update('webform_component')
    ->condition('type', 'civicrm_contact')
    ->expression('extra', 'REPLACE(extra, \'"check_permissions";i:0\', \'"check_permissions";i:1\')')
    ->execute();
  return st('All "Existing Contact" fields have been modified to enable the "Enforce Permissions" setting. In most cases you do not need to further modify this setting. You may wish to review your webforms if you are an advanced user and have configured custom contact permissions.');
}