I just want to save data in stat table but it show me error:
Missing argument 1 for CUserIdentity::__construct(), called in C:\xamp\htdocs\balteen\protected\controllers\RegisterController.php on line 60 and defined
My code:
$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));
}