public function beforeSave() { if ($this->isNewRecord) { $this->creation_date = new CDbExpression('NOW()'); } return parent::beforeSave(); }
/** * Returns the static model of the specified AR class. * @param string $className * @return User the static model class */ public static function model($className = __CLASS__) { return parent::model($className); }