[Liam W] (RIP) Member Self Delete

[Liam W] (RIP) Member Self Delete 2.0.5 Patch Level 5

No permission to download
I think you should create a paid pro version of this addon so you can get something back from your work.
If it posted a thread in a specified forum every time someone starts the deletion process, I would pay for it.
This other addon hasn't been updated for about 7 years https://xenforo.com/community/threads/wmtech-user-self-delete-pro-paid.91632/ and the author isn't responding, so this is the most likely candidate for people wanting self delete functionality.
I will happily pay for the pro version.
 
I think you should create a paid pro version of this addon so you can get something back from your work.
If it posted a thread in a specified forum every time someone starts the deletion process, I would pay for it.
This other addon hasn't been updated for about 7 years https://xenforo.com/community/threads/wmtech-user-self-delete-pro-paid.91632/ and the author isn't responding, so this is the most likely candidate for people wanting self delete functionality.
@Ozzy47 any thoughts on this?
 
@Ozzy47 it would be nice to add the following code for deleting various user details inside doDisable() function:
Code:
// Remove profile details
$profile = $this->user->Profile;
$profile->dob_day = 0;
$profile->dob_month = 0;
$profile->dob_year = 0;
$profile->signature = '';
$profile->website = '';
$profile->location = '';
$profile->about = '';
$profile->custom_fields = [];
$profile->save();

// Set Privacy to None
$privacy = $this->user->Privacy;
$privacy->allow_view_profile = 'none';
$privacy->allow_post_profile = 'none';
$privacy->allow_receive_news_feed = 'none';
$privacy->allow_send_personal_conversation = 'none';
$privacy->allow_view_identities = 'none';
$privacy->save();

// Remove avatar
/** @var \XF\Service\User\Avatar $avatarService */
$avatarService = $this->service('XF:User\Avatar', $this->user);
$avatarService->deleteAvatar();

// Remove banner
/** @var \XF\Service\User\ProfileBanner $bannerService */
$bannerService = $this->service('XF:User\ProfileBanner', $this->user);
$bannerService->deleteBanner();

// Remove albums
$albumRepo = \XF::repository('XFMG:Album');
$albumList = $albumRepo->findAlbumsForUser($this->user);
$albums = $albumList->fetch();
foreach ($albums AS $album)
{
    /** @var \XFMG\Service\Album\Deleter $deleter */
    $deleter = $this->service('XFMG:Album\Deleter', $album);
    $deleter->delete('soft');
}


Feature Suggestions
  • Username "randomization" is currently being done using a somewhat hardcoded pattern - phrase deleted_member followed by a space and the user id.

    If multiple languages are being used, the resulting username will depend on the language - this IMHO isn't ideal, we'd like all deleted members to have the same username pattern.

    I therefore suggest to add a new option that does allow to override this behaviour by entering a text does contain a placeholder for the user id.
  • Link in visitor menu
    It would be nice if this could be optional (style property or option), I don't think the option to delete the account needs to be that prominent

I think you should create a paid pro version of this addon so you can get something back from your work.
If it posted a thread in a specified forum every time someone starts the deletion process, I would pay for it.
This other addon hasn't been updated for about 7 years https://xenforo.com/community/threads/wmtech-user-self-delete-pro-paid.91632/ and the author isn't responding, so this is the most likely candidate for people wanting self delete functionality.

I’ve added these to the wish list.
 
im getting the following errors when users try to delete:


Code:
ErrorException: [E_NOTICE] Trying to access array offset on value of type bool src/addons/LiamW/AccountDelete/Service/AccountDelete.php:216
Generated by: Matt Derrick Mar 26, 2022 at 8:03 AM
Stack trace
#0 src/addons/LiamW/AccountDelete/Service/AccountDelete.php(216): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/nginx/dom...', 216, Array)
#1 src/addons/LiamW/AccountDelete/Job/DeleteAccounts.php(47): LiamW\AccountDelete\Service\AccountDelete->executeDeletion()
#2 src/XF/Job/Manager.php(260): LiamW\AccountDelete\Job\DeleteAccounts->run(7.77112)
#3 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.77112)
#4 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 7.77112)
#5 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
#6 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(NF\Discord\XF\Admin\Controller\Tools), NULL)
#8 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(NF\Discord\XF\Admin\Controller\Tools), NULL)
#9 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#11 src/XF.php(517): XF\App->run()
#12 admin.php(13): XF::runApp('XF\\Admin\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(24) "/admin.php?tools/run-job"
  ["referrer"] => string(154) "https://squattheplanet.com/admin.php?tools/run-job&only_ids=605187%2C605188%2C605189&_xfRedirect=https%3A%2F%2Fsquattheplanet.com%2Fadmin.php%3Fadd-ons%2F"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(45) "https://squattheplanet.com/admin.php?add-ons/"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(20) "605187,605188,605189"
  }
}
 
Hey!
First of all, thanks for the nice plugin.

I haven't found a documentation for it. I've added the plugin, set the deletion options and then set the suer criteria, but deletion is not working. Board is saying that there is no permission for normal users to do use action.
Any guesses?
 
I haven't found a documentation for it. I've added the plugin, set the deletion options and then set the suer criteria, but deletion is not working. Board is saying that there is no permission for normal users to do use action.
We used to use this add-on, haven't for a while.

It worked for us, non-mod members could self-delete their accounts themselves.
It did not wipe their content/post-history, rather, record of their username/member-profile-etc..

As for how to set it up, I won't be of much help there at the moment.
 
Ozzy47 updated [Liam W] (RIP) Member Self Delete with a new update entry:

[Liam W] (RIP) Member Self Delete for XenForo 2.1+ Update 2.0.5

2.0.5:
  • Code refactor & cleanup
  • New feature: thread report creation about started deletion process
  • Added username randomization format option
  • Added option to remove avatar & banner on account disable
  • Added option to remove profile info & set closed privacy settings
  • Added option to disable visitor menu item

Read the rest of this update entry...
 
@Ozzy47 Server error log with this update.

Code:
ErrorException: Job LiamW\AccountDelete:DeleteAccounts: [E_WARNING] Undefined array key "enabled" src/addons/LiamW/AccountDelete/Service/AccountDelete.php:130

Generated by: Unknown account Jun 13, 2022 at 5:54 PM

Stack trace

#0 src/addons/LiamW/AccountDelete/Service/AccountDelete.php(130): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/nadda/pub...', 130)
#1 src/addons/LiamW/AccountDelete/Job/DeleteAccounts.php(45): LiamW\AccountDelete\Service\AccountDelete->executeDeletion()
#2 src/XF/Job/Manager.php(260): LiamW\AccountDelete\Job\DeleteAccounts->run(7.97969)
#3 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.97969)
#4 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 7.97969)
#5 job.php(43): XF\Job\Manager->runQueue(false, 8)
#6 {main}

Request state

array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(48) "/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
@Ozzy47 Server error log with this update.

Code:
ErrorException: Job LiamW\AccountDelete:DeleteAccounts: [E_WARNING] Undefined array key "enabled" src/addons/LiamW/AccountDelete/Service/AccountDelete.php:130

Generated by: Unknown account Jun 13, 2022 at 5:54 PM

Stack trace

#0 src/addons/LiamW/AccountDelete/Service/AccountDelete.php(130): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/nadda/pub...', 130)
#1 src/addons/LiamW/AccountDelete/Job/DeleteAccounts.php(45): LiamW\AccountDelete\Service\AccountDelete->executeDeletion()
#2 src/XF/Job/Manager.php(260): LiamW\AccountDelete\Job\DeleteAccounts->run(7.97969)
#3 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.97969)
#4 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 7.97969)
#5 job.php(43): XF\Job\Manager->runQueue(false, 8)
#6 {main}

Request state

array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(48) "/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

@Painbaker ?
 
Have you updated the addon in ACP?
If yes, try to rebuild add-on data.

@Painbaker Does not fixed and still getting this Server error log:

Code:
ErrorException: Job LiamW\AccountDelete:DeleteAccounts: [E_WARNING] Undefined array key "enabled" src/addons/LiamW/AccountDelete/Service/AccountDelete.php:130

Generated by: Unknown account Jun 15, 2022 at 11:46 PM

Stack trace

#0 src/addons/LiamW/AccountDelete/Service/AccountDelete.php(130): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/nadda/pub...', 130)
#1 src/addons/LiamW/AccountDelete/Job/DeleteAccounts.php(45): LiamW\AccountDelete\Service\AccountDelete->executeDeletion()
#2 src/XF/Job/Manager.php(260): LiamW\AccountDelete\Job\DeleteAccounts->run(7.97474)
#3 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.97474)
#4 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 7.97474)
#5 job.php(43): XF\Job\Manager->runQueue(false, 8)
#6 {main}

Request state

array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(67) "/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Does not fixed and still getting this Server error log:

How does the "Randomise username" option look like for you?
It should be like this and all sub-options must have default values.

PHP:
array:2 [▼
  "enabled" => false
  "username" => false
]

1655318426954.webp


Probably, you have not completely imported the addon data.


Try manually re-upload the addon files (with replacement) and rebuild it again or if you use ACP "Install/upgrade from archive", please check the
"Overwrite existing files for add-on rebuilds / upgrades" option
 
How does the "Randomise username" option look like for you?
It should be like this and all sub-options must have default values.

PHP:
array:2 [▼
  "enabled" => false
  "username" => false
]

View attachment 269735


Probably, you have not completely imported the addon data.


Try manually re-upload the addon files (with replacement) and rebuild it again or if you use ACP "Install/upgrade from archive", please check the
"Overwrite existing files for add-on rebuilds / upgrades" option

Done but What about this error?

There are scheduled jobs outstanding which have not run. Jobs may not be getting triggered when expected.

ScreenShot00500.webp
 
Top Bottom