Update fillsurvey.php

Some fixes when accessing anonymous survey -refs #6829
1.9.x
ycastillo 11 years ago
parent d522660d8d
commit f091d0a529
  1. 4
      main/survey/fillsurvey.php

@ -70,8 +70,8 @@ if ($surveyCode != "") {
$resultAnonymous = Database::query($sql);
$rowAnonymous = Database::fetch_array($resultAnonymous, 'ASSOC');
// If is anonymous and is not allowed to take the survey to anonymous users, forbid access:
if (!isset($rowAnonymous['anonymous']) || ($rowAnonymous['anonymous'] == 0 && api_is_anonymous($_user['user_id'], true)) || count($rowAnonymous) == 0) {
api_not_allowed();
if (!isset($rowAnonymous['anonymous']) || ($rowAnonymous['anonymous'] == 0 && api_is_anonymous(), true)) || count($rowAnonymous) == 0) {
api_not_allowed(true);
}
// If is anonymous and it is allowed to take the survey as anonymous, mark survey as anonymous.
}

Loading…
Cancel
Save