缺少CUserIdentity :: __ construct()的参数1

时间:2013-11-12 11:29:05

标签: php yii yii-components yii-events

我只想在stat表中保存数据,但它显示错误:

  

缺少CUserIdentity :: __ construct()的参数1,在第60行的C:\ xamp \ htdocs \ balteen \ protected \ controllers \ RegisterController.php中调用并定义

我的代码:

$stats = new Stat();                   
$stats->browser = Yii::app()->browser->getBrowser();
$stats->os = Yii::app()->browser->getPlatform();
$stats->tableName = 'Organization';
$stats->user_id = 0;
$stats->field_id = 0;
$stats->activity = "sign up";
$stats->ip = $_SERVER['REMOTE_ADDR'];
$stats->time = localtime();

if($stats->save())
{            
    $this->render('success',array('model' => $title));                            
} 

0 个答案:

没有答案