Instead of deleting $this->redirect(...); or using the second parameter
redirection (..., $ terminate = true, ...)
$ terminate - Whether to terminate the current application after calling this method. The default value is true.
You can also put $this->redirect(...); into an if statement, for example:
if($model->save()) { $identity=new UserIdentity($email,$password); $identity->authenticate(); if(Yii::app()->user->login($identity)) $this->redirect(array('account/profile','id'=>$model->id)); }
But, of course, this is not the final solution, you may have to use else , as well as in your individual cases.
Also used is $this->redirect(..., false); with the second parameter, thanks lucifurious .
$this->redirect(array('account/profile','id'=>$model->id), false);
source share