$user = $this->em()->find('XF:User', $thread->user_id);
=> i have that $user that i need
Code:
$creator = $this->service('XF:Thread\Creator', $forum);
$creator->setPerformValidations(false);
$creator->setContent($title, $message);
$creator->setPrefix($thread->prefix_id);
$thread2 = $creator->save();
This code runs perfect for me; so dont care about $thread2 for example.
How can i add that $user for creating the new thread(and post)
Something like
$creator->setUser($user);
Last edited: