Fix would be to replace
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;
}
}
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;
}
}
/src/addons/LiamW/AccountDelete/Listener.php
roughly around line 25
.Fix would be to replace
withPHP: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; } }
inPHP: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; } }
/src/addons/LiamW/AccountDelete/Listener.php
roughly around line25
.
The randomised username option sets the username to Deleted member <user_id.How does "Randomise username" exactly work?
Is it possible to customize it?The randomised username option sets the username to Deleted member <user_id.
Fixed: ErrorException: Template error: [E_WARNING] Attempt to read property "group_id" on null
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}
We just did. Testing an account for deletion, we get this on the account: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 use essential cookies to make this site work, and optional cookies to enhance your experience.