Problem/Motivation
After the update from 3.x to 4.x (latest beta) I noticed a lot of warnings in our logs. We are using a custom cancellation method configured on /admin/people/purge-rule but when a user is purged it throws an exception Unknown user cancel methodin the queue processing.
The users are being removed but not logged out automatically (because this exception is thrown) and the queue item will not be processed correctly.
Steps to reproduce
1. Create custom cancellation method via hook_user_cancel_methods_alter()
2. Implement custom handling for this cancellation method via hook_user_cancel()
3. Configure to use this custom method on /admin/people/purge-rule
4. Make sure you have a user which is going to be purged and run the cron.
5. You should see errors in the log causing the items not to be processed correctly.
Proposed resolution
Remove the throwing of the exception as this is the responsibility of the developer configuring this module anyway.
Issue fork purge_users-3407883
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jaapjan commentedComment #4
ahmetburkanTested the changes and it works as expected. This is ready to be merged!
Comment #6
mably commentedSmall update: log is generated when method is unknown.
Comment #8
mably commented