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

Status
This content is read-only, or is not open for further replies.

Scandal

Guest
offline
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:

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

The problem: script was returning...

Read more

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom