iHateQuesting
Member
Is it possible, when using the following code, to set the date for the post? I see no methods for this on the reflection class.
I'm trying to set a custom "posted date" so I can backdate a few things.
Thanks in advance!
PHP:
$user = \XF::em()->find('XF:User', $data['user_id']);
$forum = \XF::em()->find('XF:Forum', $data['forum_id']);
\XF::asVisitor($user, function() use ($forum, $data) {
$creator = \XF::service('XF:Thread\Creator', $forum);
$creator->setContent($data['title'], $data['message']);
//....
$creator->save();
});
I'm trying to set a custom "posted date" so I can backdate a few things.
Thanks in advance!