Skip to content

Commit

Permalink
Fixed issue: Redirect in public registration plugins always wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Jun 27, 2018
1 parent 1c65964 commit d4c5d3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion application/controllers/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function actionIndex($sid = null)
$directLogin = $event->get('directLogin', false);
if ($directLogin == true) {
$oToken = Token::model($iSurveyId)->findByPk($iTokenId);
$redirectUrl = Yii::app()->getController()->createUrl('/'.$iSurveyId.'/', array('token' => $oToken->token, 'lang'=>$sLanguage));
$redirectUrl = Yii::app()->getController()->createUrl('/survey/', array('sid' => $iSurveyId,'token' => $oToken->token, 'lang'=>$sLanguage));
Yii::app()->getController()->redirect($redirectUrl);
Yii::app()->end();
}
Expand Down
3 changes: 2 additions & 1 deletion application/models/TemplateConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,11 @@ public function getClassAndAttributes()
$aClassAndAttributes['class']['registerform'] = ' register-form ';
$aClassAndAttributes['class']['registerul'] = ' ';
$aClassAndAttributes['class']['registerformcolrowlabel'] = ' ';
$aClassAndAttributes['class']['registerformcol'] = ' ';
$aClassAndAttributes['class']['registerformcol'] = ' register-form-column ';
$aClassAndAttributes['class']['registerformcolrow'] = ' ';
$aClassAndAttributes['class']['registerformcolrowb'] = ' ';
$aClassAndAttributes['class']['registerformcolrowc'] = ' ';
$aClassAndAttributes['class']['registerformcoladdidtions']= ' register-form-column-additions ';
$aClassAndAttributes['class']['registerformextras'] = ' ';
$aClassAndAttributes['class']['registerformcaptcha'] = ' captcha-item ';
$aClassAndAttributes['class']['registerformcolrowblabel'] = ' ';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
</div>

{# If there is additional form parts, a.e. trhough a plugin render it out here #}
</div>
<div class='{{ aSurveyInfo.class.registerformcoladdidtions }} col-md-8 col-md-offset-2' {{ aSurveyInfo.attr.registerformcoladdidtions }}>
{{ aSurveyInfo.formAdditions | raw }}
</div>

Expand Down

0 comments on commit d4c5d3b

Please sign in to comment.