当我在自动登录后使用重定向功能时,会发生此错误:
session_regenerate_id():会话对象销毁失败
任何人都可以帮助我吗?
<?php
public function actionRegister()
{
$model = new UserProfileForm;
$this->performAjaxValidation($model,'userProfile-form');
if(isset($_POST['UserProfileForm']))
{
$model->attributes = $_POST['UserProfileForm'];
if ($model->save())
{
$u = new LoginForm;
$u->username = $model->username;
$u->password = $model->password;
$u->login();
$this->redirect(Yii::app()->user->returnUrl);
}
}
$this->render('register',array('model'=>$model,));
}
?>