Commit 57cbe8fe authored by plirof2's avatar plirof2 Committed by GitHub

issue #1 fix for anonymous users warnings

quick fix for (2) (seems to work:
before line 42:

add :
if (isset($node->field_webform_results_access['und'])){
and add after line
break; } }
the line :
} //end of if (isset($node->field_webform_results_access['und']))

This does not enter the foreach in anonymous users
parent 5f96fbfb
......@@ -39,7 +39,8 @@ function webform_results_access_webform_access ($node, $account = NULL) {
else {
// For each user specified, make sure the current user is one of them,
// otherwise don't show the results.
foreach ($node->field_webform_results_access['und'] as $i => $ref) {
if (isset($node->field_webform_results_access['und'])){ //bug quick fix for anonymous users 170128
foreach ($node->field_webform_results_access['und'] as $i => $ref) {
// User Reference
if (isset($ref['uid']) && (($ref['uid'] == $account->uid))) {
$access = true;
......@@ -50,7 +51,8 @@ function webform_results_access_webform_access ($node, $account = NULL) {
$access = true;
break;
}
}
}
} //end of if (isset($node->field_webform_results_access['und']))
}
}
return $access;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment