[WMTech] User Self Delete LITE

[WMTech] User Self Delete LITE 1.1.4

No permission to download
This is clearly an indication that you do not have the most recent version installed. Please download version 1.0.4 and upload the new files and install the XML in your ACP (like with every add-on installation or upgrade). It has to show 1.0.4 if you upgraded successfully. Use Chris' Add-On Installer, if you have problems with upgrading.

The bug you experience (infinite redirect loop when friendly links are not enabled in XF) has been solved with 1.0.4.

Thanks for the answer!

But I already did this. Redownloaded (just now) from here and inside the ZIP the XML file is "addon-UserSelfDelete-103.xml"

upload_2014-12-25_10-7-20.webp

And the header of the XML is:

upload_2014-12-25_10-8-49.webp

Maybe the incorrect XML was accidentally put in the package?
 
There was indeed an error in the version number of the most recent XML. The download has been corrected.

However, the bugfixed files were included in the zip. If you still experience this bug you haven't uploaded the most recent files or not overwritten your previous files.

Please upload the files and try again. Take care that you upload the most recent version and overwrite all files at your server.
 
There was indeed an error in the version number of the most recent XML. The download has been corrected.

However, the bugfixed files were included in the zip. If you still experience this bug you haven't uploaded the most recent files or not overwritten your previous files.

Please upload the files and try again. Take care that you upload the most recent version and overwrite all files at your server.

Sorry again, but that is not the problem. Checked file per file - same. Uploaded again (just in case) - same error. Uninstalled and installed - same error

This add-on is not working in my environment for some reason (appears a infinite redirect) and it's not a file problem.

I'll have to uninstall permanently.
 
This add-on is not working in my environment for some reason (appears a infinite redirect) and it's not a file problem.

We know your bug and it has been definitely fixed with version 1.0.4.

We are very interested why this does not work in your environment. As said, this most likely happens if and older files are left and not overwritten with the most recent ones.

Can you please send me your forum url and give me access to your file system with private conversation? We want to investigate your issue, find a solution (or at least a reason) and install the update for you.
 
We know your bug and it has been definitely fixed with version 1.0.4.

We are very interested why this does not work in your environment. As said, this most likely happens if and older files are left and not overwritten with the most recent ones.

Can you please send me your forum url and give me access to your file system with private conversation? We want to investigate your issue, find a solution (or at least a reason) and install the update for you.

The problem seem to be about the Route Filters. We have a route filter for "/account" mapping it to "/cadastro" (to make the URL more friendly to our public - Portuguese speakers from Brazil). When I disable this route filter the add-on works nicely, but with the route filter on, it enters a redirect loop when the user already selected to be deleted.

I believe that's something with function frontControllerPreView in Listener.php

I tried adding some route filters like "/account/delete-account" but it didn't work. My route filters:

upload_2014-12-26_11-1-21.webp
 
We have a route filter for "/account" mapping it to "/cadastro"

You are right!

This add-on is currently not compatible with a route filter for the /account route. I am sorry, but you'll have to deactivate this route filter if you want to use this add-on.
 
You are right!

This add-on is currently not compatible with a route filter for the /account route. I am sorry, but you'll have to deactivate this route filter if you want to use this add-on.

Thanks for your time =] I can't deactivate the route filter but I edited the Listener.php from "/account" to "/cadastro" in lines 89 and 93 and it worked

[edit]

Only need to edit line 89 from Listener.php and change from

Code:
!strstr($requestUri, 'account/delete-account')

to

Code:
!strstr($requestUri, '/delete-account')


Worked nice. No more problems with route filters

[edit]

May this could be useful: https://xenforo.com/community/threads/route-match.88315/

(couldn't look into it right now)
 
Last edited:
@Deriel, removing 'account' from the url string will work fine as long as no other add-on uses an action called 'delete-acount' which is accessible to the user, however unlikely that is.
However, if you still want to ensure you are using the full url even when running a route filter for the account section, then the following will work.
I've also changed the strstr function to strpos as it is ever so slightly faster.
PHP:
public static function frontControllerPreView(XenForo_FrontController $fc, XenForo_ControllerResponse_Abstract &$controllerResponse, XenForo_ViewRenderer_Abstract &$viewRenderer, array &$containerParams)
{
    $visitor = XenForo_Visitor::getInstance();
  
    if ($visitor['user_id'] && $visitor['is_pending_delete'])
    {
        $dependencies = $fc->getDependencies();
      
        if ($dependencies instanceof XenForo_Dependencies_Public)
        {
            $requestUri = $fc->getRequest()->getRequestUri();
            $url = XenForo_Link::buildPublicLink('account/delete-account');
          
            if (strpos($requestUri, $url) === false)
            {
                $redirect = new XenForo_ControllerResponse_Redirect();
                $redirect->redirectType = XenForo_ControllerResponse_Redirect::SUCCESS;
                $redirect->redirectTarget = $url;
              
                $controllerResponse = $redirect;
            }
        }
    }
}
 
wmtech updated [WMTech] User Self Delete with a new update entry:

v 1.0.5: Route Filter combatibility, database improvement with manual deletes

Version 1.0.5:
----------------
  • Added compatibility with XenForo route filters
    Add-on will work even when route filters are enabled
  • Performance optimization
  • Delete pending delete request from database if the user is deleted manually before the date of automatic deletion
To upgrade:
Please upload all files, overriting the existing ones and install the XML in your ACP. As an alternative, you may use any optional Add-On Installer.

Read the rest of this update entry...
 
removing 'account' from the url string will work fine as long as no other add-on uses an action called 'delete-acount' which is accessible to the user, however unlikely that is.

Also this won't work if someone creates a route filter for 'delete-account'.

The add-on has now been updated to work with any route filters.
Thanks, Syndol, this was a perfect solution and saved us some work!

Also, pending delete requests are now removed, if the user will be deleted manually before the automatic deletion date.
 
Also this won't work if someone creates a route filter for 'delete-account'.

The add-on has now been updated to work with any route filters.
Thanks, Syndol, this was a perfect solution and saved us some work!

Also, pending delete requests are now removed, if the user will be deleted manually before the automatic deletion date.

Yes, thank you both! That was only a fast hack to put the add-on working for me. I have a couple of drama queens demanding deletion (but not really...) that keep pestering me and my Mods. Now, problem solved. Wanna delete account? Go for it! :D

Nice work and thanks!

@wmtech Do you have any idea when the premium mod will be available and the price?
 
wmtech updated [WMTech] User Self Delete with a new update entry:

v 1.0.5: Performance Optimization, Declutter UserChangeLog

Version 1.0.6
----------------

We decided to shoot another update out again quickly. Sorry.
  • Removes 1 unnecessary code event listener
  • Added support to remove changes done by this add-on from XenForo's User Change Log
To update:
Upload all files to your server overwriting the existing ones and install the add-ons XML in your ACP. You may use any optional Add-On Installer, if you like.

Read the rest of this update entry...
 
Thanks for the updates.
By the way the template log_user_self_delete_clear seems not to exist which means the self delete log cannot be manually cleared.
 
Thanks for the updates.
By the way the template log_user_self_delete_clear seems not to exist which means the self delete log cannot be manually cleared.

You are right.
This seems to be an oversight in the original code. It'll be fixed with the next version in a few days.
 
Also thanks for the updates. Could you please fix the wrong pagination in the User Self Delete Log?
The pagination links goes to logs/email-change&page=x

Thanks for your great addon, is being permanently used in our community.
 
wmtech updated [WMTech] User Self Delete with a new update entry:

v1.1.0: Bugfix and optimization release

Version 1.1.0
  • Fixed pagination in "self delete log" admin view
  • Removed "clear self delete log" feature
    (no one seems to use this and it also would create problems if used)
  • Optimized deletion of users and fixed the error occuring if too many users deleted themselves within the same hour
To upgrade:
Please upload all files to your server overwriting existing ones and import the XML in yur ACP. You may use any optional Add-On Installers, if you like.

Read the rest of this update entry...
 
Top Bottom