$creator = \XF::asVisitor($user, function () use ($forum, $title, $message, $thread) {
/** @var \XF\Service\Thread\Creator $creator */
$creator = $this->service('XF:Thread\Creator', $forum);
$creator->setPerformValidations(false);
$creator->setContent($title, $message);
$creator->setPrefix($thread->prefix_id);
$creator->save();
return $creator;
});
$creator->sendNotifications();
i can print_r/dump $creator, but i dont know how to pass values to new vars.
I need for example $creator->thread;