I am currently working on some cleanup code for systems external to XenForo (Newsletter, Ticket System, etc.).
To do so, I need to access the email address of the deleted user(s), however I don't see a nice way to do this:
XF\Entity\User::_postDelete()
and
XF\Job\UserDeleteCleanUp::run()
Does anyone have an idea on how to get the email (apart from completely overwriting those methods)?
If not: Would it be possible and reasonable to add the email to the core code, @ChrisD?
To do so, I need to access the email address of the deleted user(s), however I don't see a nice way to do this:
XF\Entity\User::_postDelete()
PHP:
protected function _postDelete()
{
[...]
if ($this->getOption('enqueue_delete_cleanup'))
{
$this->app()->jobManager()->enqueue('XF:UserDeleteCleanUp', [
'userId' => $this->user_id,
'username' => $this->username
]);
}
}
and
XF\Job\UserDeleteCleanUp::run()
PHP:
public function run($maxRunTime)
{
/** @var \XF\Service\User\DeleteCleanUp $deleter */
$deleter = $this->app->service(
'XF:User\DeleteCleanUp', $this->data['userId'], $this->data['username']
);
}
Does anyone have an idea on how to get the email (apart from completely overwriting those methods)?
If not: Would it be possible and reasonable to add the email to the core code, @ChrisD?