Skip to content

Commit

Permalink
Fixed issue #08527: Internal Server Error during registration
Browse files Browse the repository at this point in the history
Dev: fix $iSurveyID
  • Loading branch information
Shnoulle committed Jan 10, 2014
1 parent 67ce0a2 commit 31bad5e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions application/controllers/RegisterController.php
Expand Up @@ -50,7 +50,6 @@ function actionIndex($iSurveyID = null)
Yii::app()->loadHelper('database');
Yii::app()->loadHelper('replacements');
$sLanguage = Yii::app()->request->getParam('lang','');
$surveyid=$iSurveyID;
if($iSurveyID == null)
{
$iSurveyID = Yii::app()->request->getPost('sid');
Expand Down Expand Up @@ -110,7 +109,7 @@ function actionIndex($iSurveyID = null)
}

//Check if this email already exists in token database
$oToken=TokenDynamic::model($surveyid)->find('email=:email',array(':email'=>Yii::app()->request->getPost('register_email')));
$oToken=TokenDynamic::model($iSurveyID)->find('email=:email',array(':email'=>Yii::app()->request->getPost('register_email')));
if ($oToken)
{
$register_errormsg=$clang->gT("The email you used has already been registered.");
Expand All @@ -134,7 +133,7 @@ function actionIndex($iSurveyID = null)
while ($mayinsert != true)
{
$newtoken = randomChars($tokenlength);
$oTokenExist=TokenDynamic::model($surveyid)->find('token=:token',array(':token'=>$newtoken));
$oTokenExist=TokenDynamic::model($iSurveyID)->find('token=:token',array(':token'=>$newtoken));
if (!$oTokenExist) {$mayinsert = true;}
}

Expand Down

0 comments on commit 31bad5e

Please sign in to comment.