- π·π΄Romania claudiu.cristea Arad π·π΄
We need a decision regarding β¨ Provide a Entity Handler for user cancelation Needs work
Currently we pretend that we have an API that allows a 3rd party to implement its own user cancellation method. Relevant hooks: hook_user_cancel_methods_alter()
and hook_user_cancel()
.
However, if you create a custom method, let's say user_cancel_archive
, the code for user_cancel_block
method is also executed. It's easy to find why, by looking to _user_cancel()
function. The default:
case is the problem. But for my custom method I want to be able to set my own status message and send my own custom email. No luck, Drupal is settings its status message and sends the standard user block email. Also, it's not possible to exclude _user_cancel()
from the batch operations.
I think that this bug was possible because we have no test for a custom user cancellation method. I've added a test to prove the problem.
Based on @alexpott comment/proposal from #14:
hook_user_cancel()
hook.AccountCancelEvent
) and move the logic from hook_user_cancel()
implementations in event subscribers.None.
None.
None.
None.
Third-party that need to have a say on user account cancellation, should subscribe to \Drupal\user\Event\AccountCancelEvent event. A subscriber aiming to implement its own user account cancellation logic and avoid default core behavior should set a higher priority and bypass downstream subscribers by stopping the event propagation.
Needs work
11.0 π₯
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
We need a decision regarding β¨ Provide a Entity Handler for user cancelation Needs work