protected function beforeSave() { if (parent::beforeSave()) { $this->uid = Yii::app()->user->id; $this->uname = Yii::app()->user->name; $this->acttime = time(); return true; } else { return false; } }
protected function beforeSave() { if (parent::beforeSave()) { $this->id = (int) $this->id; $this->database_id = (int) $this->database_id; return true; } else { return false; } }