[Liam W] (RIP) Member Self Delete

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

No permission to download

maxicep

Active member
Yes i see that there is no option but i can edit the code manually if you know the directions.
Because i would like to change username as custom for deleted members.
 

TickTackk

Well-known member
Under PHP 8.0 trow this error in /admin.php?trophies:

View attachment 243131
Fix would be to replace
PHP:
    public static function optionFormBlockMacroPreRender(\XF\Template\Templater $templater, &$type, &$template, &$name, array &$arguments, array &$globalVars)
    {
        if ($arguments['group']->group_id == 'liamw_memberselfdelete')
        {
            $template = 'liamw_accountdelete_option_macros';
            $userCriteria = XF::app()
                ->criteria('XF:User', $arguments['options']['liamw_accountdelete_user_criteria']->option_value);
            $arguments['userCriteria'] = $userCriteria;
        }
    }
with
PHP:
    public static function optionFormBlockMacroPreRender(\XF\Template\Templater $templater, &$type, &$template, &$name, array &$arguments, array &$globalVars)
    {
        if ($arguments['group'] && $arguments['group']->group_id == 'liamw_memberselfdelete')
        {
            $template = 'liamw_accountdelete_option_macros';
            $userCriteria = XF::app()
                ->criteria('XF:User', $arguments['options']['liamw_accountdelete_user_criteria']->option_value);
            $arguments['userCriteria'] = $userCriteria;
        }
    }
in /src/addons/LiamW/AccountDelete/Listener.php roughly around line 25.
 

Rhodium

Active member
Fix would be to replace
PHP:
    public static function optionFormBlockMacroPreRender(\XF\Template\Templater $templater, &$type, &$template, &$name, array &$arguments, array &$globalVars)
    {
        if ($arguments['group']->group_id == 'liamw_memberselfdelete')
        {
            $template = 'liamw_accountdelete_option_macros';
            $userCriteria = XF::app()
                ->criteria('XF:User', $arguments['options']['liamw_accountdelete_user_criteria']->option_value);
            $arguments['userCriteria'] = $userCriteria;
        }
    }
with
PHP:
    public static function optionFormBlockMacroPreRender(\XF\Template\Templater $templater, &$type, &$template, &$name, array &$arguments, array &$globalVars)
    {
        if ($arguments['group'] && $arguments['group']->group_id == 'liamw_memberselfdelete')
        {
            $template = 'liamw_accountdelete_option_macros';
            $userCriteria = XF::app()
                ->criteria('XF:User', $arguments['options']['liamw_accountdelete_user_criteria']->option_value);
            $arguments['userCriteria'] = $userCriteria;
        }
    }
in /src/addons/LiamW/AccountDelete/Listener.php roughly around line 25.

Thanks, fixed 🤗
 

scuneq

New member
hello, I installed this plugin, I set everything up and tested it. Unfortunately, in User deletion logs, it is still pending

in cron jobs in admin cp I don't even see any jobs for this add-on
 

Salamanca

Member
Hi there,

We downloaded and testing this addon. Unfortunately the user does not get deleted, and we have thousands of entries of this error in the error log:


Code:
Exception: Could not find class LiamW\AccountDelete\XF\Entity\User when attempting to extend XF\Entity\User src\XF\Extension.php:174
Generated by: Unknown account 13 Απρ 2021 στις 03:26
Stack trace
#0 src\XF\Mvc\Entity\Manager.php(53): XF\Extension->extendClass('XF\\Entity\\User')
#1 src\XF\Mvc\Entity\Manager.php(123): XF\Mvc\Entity\Manager->getEntityClassName('XF:User')
#2 src\XF\Repository\User.php(24): XF\Mvc\Entity\Manager->find('XF:User', '203668', Array)
#3 src\XF\App.php(1902): XF\Repository\User->getVisitor('203668', Array)
#4 src\XF\Pub\App.php(156): XF\App->getVisitorFromSession(Object(XF\Session\Session))
#5 src\XF\App.php(2322): XF\Pub\App->start(true)
#6 src\XF.php(488): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}
 

Ozzy47

Well-known member
Sounds to me like some of the files could be missing.

I’d uninstall the addon, clear the errors, then reinstall the addon via the archive installer.
 

Salamanca

Member
Sounds to me like some of the files could be missing.

I’d uninstall the addon, clear the errors, then reinstall the addon via the archive installer.
We just did. Testing an account for deletion, we get this on the account:

This account is scheduled for deletion, and will be deleted on 13 Απρ 2021 στις 13:38.

But that was 5 minutes ago.

Is there supposed to be a cron entry for this addon? If yes, then there's something wrong there, as we cannot see a cron entry for the addon.
 
Top