Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
 protected function beforeSave()
 {
     if (parent::beforeSave()) {
         $this->id = (int) $this->id;
         $this->database_id = (int) $this->database_id;
         return true;
     } else {
         return false;
     }
 }