You are here

function nodeaccess_userreference_update_6300 in Node access user reference 7.3

Same name and namespace in other branches
  1. 6.3 nodeaccess_userreference.install \nodeaccess_userreference_update_6300()

Unset author grants for updated installations.

File

./nodeaccess_userreference.install, line 42
Install, update and uninstall functions for the Node access user reference module.

Code

function nodeaccess_userreference_update_6300() {

  // Set author grants to 0, unless already set.
  $view = variable_get('nodeaccess_userreference_author_view', 0);
  $update = variable_get('nodeaccess_userreference_author_update', 0);
  $delete = variable_get('nodeaccess_userreference_author_delete', 0);
  variable_set('nodeaccess_userreference_author_view', $view);
  variable_set('nodeaccess_userreference_author_update', $update);
  variable_set('nodeaccess_userreference_author_delete', $delete);
  drupal_set_message(t('Node access user reference settings have changed.  Please check your User reference field settings.'), 'warning');
  $ret[] = array(
    'success' => TRUE,
    'query' => 'Updating author grants.',
  );
  return $ret;
}