/** * @inheritdoc */ public function afterSave($insert, $changedAttributes) { if ($insert) { $profile = new UserProfile(); $profile->owner_id = $this->id; $profile->tryInsert(false); } parent::afterSave($insert, $changedAttributes); }
/** * @inheritdoc */ public function afterSave($insert, $changedAttributes) { if ($insert) { $profile = new UserProfile(); $profile->owner_id = $this->id; $profile->tryInsert(false); } parent::afterSave($insert, $changedAttributes); }