function webform_encrypt_preprocess_webform_results_table in Webform Encrypt 7
Preprocess for theme('webform_results_table').
Decrypt webform values in the table display.
File
- ./
webform_encrypt.module, line 121 - Main module file for the Webform Encrypt module.
Code
function webform_encrypt_preprocess_webform_results_table(&$vars) {
foreach ($vars['submissions'] as $sid => &$submission) {
foreach ($submission->data as $cid => &$item) {
$component = $vars['components'][$cid];
if (!empty($component['extra']['encrypt'])) {
foreach ($item['value'] as &$value) {
if (!empty($value)) {
$value = user_access('view encrypted values') ? decrypt($value, array(
'base64' => TRUE,
)) : t('[Value Encrypted]');
}
}
}
}
}
}