Skip to content

Commit

Permalink
Fixed issue #6672: Error when a user without admin access try to visu…
Browse files Browse the repository at this point in the history
…alise a survey
  • Loading branch information
c-schmitz committed Oct 11, 2012
1 parent b127972 commit eb8b5e3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions application/controllers/survey/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,9 @@ function _canUserPreviewSurvey($iSurveyID)
if ( $_SESSION['USER_RIGHT_SUPERADMIN'] == 1 )
return true;

$sQuery = dbExecuteAssoc(
"SELECT uid
$sQuery = "SELECT uid
FROM {{survey_permissions}}
WHERE sid = ".$iSurveyID." AND uid = ".$_SESSION['loginID']);
WHERE sid = ".$iSurveyID." AND uid = ".$_SESSION['loginID'];
$aRow = Yii::app()->db->createCommand($sQuery)->queryRow();
if ( $aRow )
return true;
Expand Down

0 comments on commit eb8b5e3

Please sign in to comment.