Custom cancellation methods may not be executed completely

Created on 7 November 2024, 17 days ago

Problem/Motivation

In 🐛 Do not throw exceptions for custom cancellation methods Active , it was made sure that custom cancellation methods no longer throw an exception, allowing hook_user_cancel to process custom methods that were added through hook_user_cancel_methods_alter. However, typically, cancel methods may hook into the batch processing that is kicked off when cancelling a user through the regular core form. This module, in effect, completely ignores the core code for cancellation methods, and re-implements them in a somewhat queue-friendly way. For custom cancellation methods it obviously does no such thing.

Steps to reproduce

* Implement a custom cancellation method through hook_user_cancel_methods_alter and hook_user_cancel.
* Make sure the method creates a batch that you can verify the effect of, such as unpublishing all the user's content
* Call the method through the cron process of this module by selecting it as the method to use on cron.
* Notice how the method has no effect.

Proposed resolution

Not sure, TBH. I was in the process of rewriting some heavy cancellation methods into batch-based ones, only to remember this module is also in the mix and me not remembering it doing anything fancy to process batches on cron. The fanciest solution would be for cancellation methods to become plugin-based, in such a way that the methods doing the heavy lifting could be called through a batch- or queue-based mechanism. This would need core-involvement though.

Remaining tasks

* Compe up with a solution

User interface changes

* None

API changes

* Undecided

Data model changes

* None(?)

Feature request
Status

Active

Version

4.0

Component

Code

Created by

🇳🇱Netherlands eelkeblok Netherlands 🇳🇱

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024