\XF\Job\AbstractRebuildJob and $user->delete() error (I have fixed it but needed better solution)

Hello all! :)

I have built an \XF\Job\AbstractRebuildJob extension class for running my own rebuilding job.

It uses as intended a protected function getNextIds($start, $batch) method and the protected function rebuildById($id).

We're talking about User entity which fetched as $id.
On rebuildById($id) I do the following:
PHP:

Код:
$user = $this->app->em()->find('XF:User', $id, []);
// [...] some checks
$user->delete(false);

The problem: script was returning...

Read more

Читать далее...
 
Активность
Пока что здесь никого нет
Назад
Верх Низ