diff --git a/webform_encrypt.install b/webform_encrypt.install index dc37dff..2d5cfc6 100644 --- a/webform_encrypt.install +++ b/webform_encrypt.install @@ -19,8 +19,6 @@ function webform_encrypt_disable() { * Implementation of hook_uninstall(). */ function webform_encrypt_uninstall() { - variable_del('webform_encrypt_match_user'); - // Decrypt all encrypted form values. $components = array(); $results = db_query('SELECT nid, cid, extra FROM {webform_component}')->fetchAll(); diff --git a/webform_encrypt.module b/webform_encrypt.module index ea2d4cc..a6bfd31 100644 --- a/webform_encrypt.module +++ b/webform_encrypt.module @@ -6,37 +6,6 @@ */ /** - * Implementation of hook_permission(). - */ -function webform_encrypt_permission() { - return array( - 'view encrypted values' => array( - 'title' => t('View Encrypted Values in Webform Results'), - 'description' => t('Users that do not have this permission will see placeholder text.'), - ), - ); -} - -/** - * Implementation of hook_form_FORM_ID_alter(). - */ -function webform_encrypt_form_webform_admin_settings_alter(&$form, $form_state) { - // Add our config options to the webform settings page. - $form['encrypt'] = array( - '#type' => 'fieldset', - '#title' => t('Webform Encrypt'), - '#collapsible' => TRUE, - '#collapsed' => FALSE, - ); - $form['encrypt']['webform_encrypt_match_user'] = array( - '#type' => 'checkbox', - '#title' => t('Enable email to user matching'), - '#description' => t('If enabled, every time webform sends an email, it will attempt to find a user that matches the email address the mail will be sent to in order to correctly determine permissions.'), - '#default_value' => variable_get('webform_encrypt_match_user', 0), - ); -} - -/** * Implementation of hook_form_FORM_ID_alter(). */ function webform_encrypt_form_webform_component_edit_form_alter(&$form, $form_state) { @@ -105,7 +74,7 @@ function webform_encrypt_webform_submission_load($submissions) { if (!empty($node->webform['components'][$cid]['extra']['encrypt'])) { foreach ($submission->data[$cid] as $delta => $value) { if (!empty($entry[$delta]) && @unserialize($entry[$delta]) !== FALSE) { - $submission->data[$cid][$delta] = user_access('view encrypted values') ? decrypt($entry[$delta], array('base64' => TRUE)) : t('[Value Encrypted]'); + $submission->data[$cid][$delta] = decrypt($entry[$delta], array('base64' => TRUE)); } } } @@ -124,7 +93,7 @@ function webform_encrypt_preprocess_webform_results_table(&$vars) { $component = $vars['components'][$cid]; if (!empty($component['extra']['encrypt'])) { foreach ($item['value'] as &$value) { - $value = user_access('view encrypted values') ? decrypt($value, array('base64' => TRUE)) : t('[Value Encrypted]'); + $value = decrypt($value, array('base64' => TRUE)); } } }