Account cancellation method not respected

Created on 19 December 2024, 4 months ago

Steps to reproduce

Delete a user, select the option "Delete the account and make its content belong to the Anonymous user. This action cannot be undone."

All the users profiles are deleted anyway.

This is not what we expected to happen and had caused unrecoverable data loss...

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇧🇪Belgium weseze

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

Merge Requests

Comments & Activities

  • Issue created by @weseze
  • gaurav gupta Jaipur, Rajasthsan

    gaurav gupta changed the visibility of the branch 8.x-1.x to hidden.

  • Pipeline finished with Success
    4 months ago
    Total: 301s
    #379412
  • I followed below steps
    selected the user account I want to delete.
    Choose the option to delete the account and select "Delete the account and make its content belong to the Anonymous user."
    Everything looks fine for me so moving it to RTBC.
    Also attaching the screen recording FYR.

  • 🇮🇱Israel jsacksick

    Well the thing is, I'm not sure "Delete the account and make its content belong to the Anonymous user." applies to profiles... but maybe.

    Also, depending on the request to figure out whether we should delete the profile is not a good idea as it basically breaks deletion of a user programatically...

      $method = \Drupal::requestStack()->getCurrentRequest()->query->get('delete-method');
      if (!$method) {
        $method = \Drupal::config('user.settings')->get('cancel_method');
      }
  • 🇧🇪Belgium weseze

    For my use case I have written some custom code to "fix" the issue.

    I'm tempted to agree with jsacksick on this:

    Well the thing is, I'm not sure "Delete the account and make its content belong to the Anonymous user." applies to profiles... but maybe.

    Perhaps it might be enough to add a warning message that profiles will also be deleted?

Production build 0.71.5 2024