T
truonglv
Guest
I have been setup to allow user can delete their account which used \XF\Service\User\Delete service.
PHP:
But with the line 55 in service it resets all options and then when invoke delete() again; it triggers preDelete...
Read more
Continue reading...
PHP:
Code:
/** @var \XF\Service\User\Delete $deleter */
$deleter = $this->service('XF:User\Delete', $visitor);
$deleter->renameTo('guest-' . time());
$deleter->getUser()->setOption('allow_self_delete', true);
if (!$deleter->delete($errors)) {
return $this->error($errors);
}
But with the line 55 in service it resets all options and then when invoke delete() again; it triggers preDelete...
Read more
Continue reading...