kahovn
Member
Hi All,
I have a problem. When restore a user that had spam, the user have over 200,000 records comment. So when restore for user is not ok.
Error: Oops! We ran into some problems. Please try again later. More error details may be in the browser console.
Code here:
if ($this->isPost())
{
$restorer = $this->app->spam()->restorer($entry);
$restorer->restoreContent();
$restorer->liftBan();
$restorer->finalize();
return $this->redirect($this->getDynamicRedirect());
}
Update post:
foreach ($posts AS $post)
{
/** @var \XF\Entity\Post $post */
$post->setOption('log_moderator', false);
$post->message_state = 'visible';
$post->save();
}
=====> die, not update restore
Please me advance, thanks
I have a problem. When restore a user that had spam, the user have over 200,000 records comment. So when restore for user is not ok.
Error: Oops! We ran into some problems. Please try again later. More error details may be in the browser console.
Code here:
if ($this->isPost())
{
$restorer = $this->app->spam()->restorer($entry);
$restorer->restoreContent();
$restorer->liftBan();
$restorer->finalize();
return $this->redirect($this->getDynamicRedirect());
}
Update post:
foreach ($posts AS $post)
{
/** @var \XF\Entity\Post $post */
$post->setOption('log_moderator', false);
$post->message_state = 'visible';
$post->save();
}
=====> die, not update restore
Please me advance, thanks