- Issue created by @Anybody
- 🇩🇪Germany Anybody Porta Westfalica
Eventually this is just blocked by billwerk and we should instead lock the customer and the contract, if it's not possible to delete it.
- 🇩🇪Germany Anybody Porta Westfalica
I can confirm this still doesn't work and there are not even log entries in this case. Maybe the user delete hook doesn't work?
- 🇩🇪Germany Anybody Porta Westfalica
This is the current implementation in
billwerk_subscriptions_handler_default.module
:/** * Implements hook_entity_TYPE_delete(). */ function billwerk_subscriptions_handler_default_entity_user_delete(UserInterface $user) { $onDrupalUserDelete = \Drupal::config('billwerk_subscriptions_handler_default.settings')->get('on_drupal_user_delete'); if (!empty($onDrupalUserDelete)) { try { $subscriber = Subscriber::load($user); if ($subscriber->hasUserBillwerkContractId()) { switch ($onDrupalUserDelete) { case 'lock': $subscriber->billwerkLockCustomer(); break; case 'delete': $subscriber->billwerkDeleteCustomer(); break; } } } catch (\Exception $e) { // Log exception: Error::logException(\Drupal::logger('billwerk_subscriptions_handler'), $e); // Show error message: // For now do not show the error to the user, as it might be confusing or // even risky. // @see https://www.drupal.org/project/billwerk_subscriptions/issues/3439472: // \Drupal::messenger()->addError($e->getMessage()); } } }