[Liam W] (RIP) Member Self Delete

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

No permission to download
I wasn't aware that XF had a disabled user state. I can't seem to find anything about it in the docs or my ACP. You don't mean 'discouraged', right?

No, it isn't documented unfortunately. If you go to the admin edit user page for any user, it's listed as an option in the 'User state' dropdown.
 
Aha! I see it now.
When in a user state other than 'Valid', users will receive permissions from the Unregistered / Unconfirmed group.
Having an option to "promote" a user to a user defined user group (like my closed accounts group) would allow admins more control over how closed accounts are handled. While permissions to access the forum really shouldn't be any different from a logged out visitor, it is nice to be able to set user titles and/or user banners to indicate that the account has been closed so active members who see their posts in the forums understand the member isn't around to answer posts or conversations.
 
@Liam W please add user criteria to define which members are allowed to self delete their account.
Like many others, I do not want members to be able to delete their account if they have content, warnings, bad ratings or are in certain usergroups.
 
Liam W updated Member Self Delete with a new update entry:

1.2.0 Beta 1

Another second point jump, with a host of new features.

  • User criteria eligibility
    You can now set user criteria that must be met for users to be able to delete their accounts.
  • Permission
    There is now a user group permission to control who can delete their accounts. This is in addition to the user criteria above.
  • Disabled usergroup
    There is now an option to add a user to an additional user group when they've been disabled. This can be used to adjust the username styling for...

Read the rest of this update entry...
 
Error after Upgrade: Member Self Delete · 1.1.0 Beta 4 -> 1.2.0 Beta 1

Oops! We ran into some problems.



Callback \LiamW\AccountDelete\Cron\DeleteAccounts::deleteAccounts is invalid (error_invalid_class).

Server error log



  • XF\PrintableException: Batch install error: Callback \LiamW\AccountDelete\Cron\DeleteAccounts::deleteAccounts ist ungültig (error_invalid_class).
  • src/XF/Mvc/Entity/Entity.php:1154

  • Generated by: Admin2
  • Sep 2, 2019 at 6:42 AM

Stack trace
#0 src/XF/AddOn/DataType/CronEntry.php(72): XF\Mvc\Entity\Entity->save(true, false)
#1 src/XF/Job/AddOnData.php(106): XF\AddOn\DataType\CronEntry->importAddOnData('LiamW/AccountDe...', Object(SimpleXMLElement), 0, G)
#2 src/XF/Job/AddOnInstallBatch.php(339): XF\Job\AddOnData->run(G)
#3 src/XF/Job/AddOnInstallBatch.php(94): XF\Job\AddOnInstallBatch->stepData(Object(XF\Timer))
#4 src/XF/Job/Manager.php(253): XF\Job\AddOnInstallBatch->run(G)
#5 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#6 src/XF/Job/Manager.php(111): XF\Job\Manager->runJobEntry(Array, G)
#7 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#8 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#10 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#13 src/XF.php(390): XF\App->run()
#14 admin.php(13): XF::runApp('XF\\Admin\\App')
#15 {main}



Request state


array(4) {
["url"] => string(24) "/admin.php?tools/run-job"
["referrer"] => string(49) "https://www.mydomain.tld/admin.php?tools/run-job"
["_GET"] => array(1) {
["tools/run-job"] => string(0) ""
}
["_POST"] => array(3) {
["_xfRedirect"] => string(85) "https://www.mydomain.tld/admin.php?add-ons/install-from-archive-complete&batch_id=47"
["_xfToken"] => string(8) "****"
["only_ids"] => string(4) "7689"
}
}
 
Also please can you add one more functionality request limitations for how many time user can request for account deletion or disable.

@Liam W Please can add this functionality? We need this functionality because member do request lot of then Cancelled.

Example: Today made request for deletion then Tomorrow requested for Cancelled and then continued this steps.
 
@Nirjonadda I've just released Beta 3 on GitHub with that feature. I don't want to publish an update here, as I've already done two in the space of a few hours and another might seem excessive :)

 
@Liam W

Sorry for Tagging you. Beta 3 Error...

TypeError: Argument 2 passed to LiamW\AccountDelete\Service\AccountDelete::__construct() must be an instance of XF\Entity\User, null given, called in /var/www/vhosts/mydomain.tld/httpdocs/src/XF/Container.php on line 274 src/addons/LiamW/AccountDelete/Service/AccountDelete.php:29

Generiert von: Unbekanntes Konto 2 September 2019 um 21:00

Stack-Trace

#0 src/XF/Container.php(274): LiamW\AccountDelete\Service\AccountDelete->__construct(Object(XF\Pub\App), NULL)
#1 src/XF/App.php(1564): XF\Container->createObject('LiamW\\AccountDe...', Array)
#2 src/XF/Container.php(228): XF\App->XF\{closure}('LiamW\\AccountDe...', Array, Object(XF\Container))
#3 src/XF/App.php(2770): XF\Container->create('service', 'LiamW\\AccountDe...', Array)
#4 src/XF.php(682): XF\App->service('LiamW\\AccountDe...', NULL)
#5 src/addons/LiamW/AccountDelete/Job/DeleteAccounts.php(38): XF::service('LiamW\\AccountDe...', NULL)
#6 src/XF/Job/Manager.php(253): LiamW\AccountDelete\Job\DeleteAccounts->run(G)
#7 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#8 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#9 job.php(42): XF\Job\Manager->runQueue(false, 8)
#10 {main}

Status der Anfrage

array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(90) "https://www.mydomain.tld/threads/wohngeld-wie-hoch-muss-das-mindesteinkommen-sein.208077/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Hmm, that's strange. It would indicate it's trying to action a deletion for a non-existent user, which should be impossible. I'll take a look.
 
Yeah, this is weird. If the user was deleted properly, then the deletion request should've been cancelled and therefore that code path wouldn't've been reached. Is there a record in your deletion log that says 'Pending' with no username?
 
Hello,

what exactly does a randomize username look like?
And what difference does it make if I deactivate the account (+email and password deletion) or delete it?

These two fields have the same name, so they are always both activated at the same time.
1567604784600.webp
 
Last edited:
The randomised username option sets the username to Deleted member <user_id. Deactivating the account keeps the user record in the database, allowing the user to be restored at a later date if need be. The delete option completely removes the user from the database.
 
Top Bottom