Missing argument 1 for CUserIdentity::__construct()

709 Views Asked by At

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));                            
} 
0

There are 0 best solutions below