User account default setting for cancel confirm is not used

Created on 26 January 2019, about 6 years ago
Updated 14 June 2024, 8 months ago

Problem/Motivation

There is a user setting named notify.cancel_confirm, which should be used a default value for "Account cancellation confirmation". Unfortunately it has no effect. Besides that you are not able to change this default setting in the account settings form (admin/config/people/accounts).

This is a follow up issue of https://www.drupal.org/project/drupal/issues/2854884 β†’ .

Proposed resolution

  1. Use the user setting named notify.cancel_confirm as default value for the user cancel form.
  2. Provide a checkbox in account settings (admin/config/people/accounts) under "When cancelling a user account", with a note that this can be overridden by users with sufficient permissions.
πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
User systemΒ  β†’

Last updated 4 days ago

Created by

πŸ‡©πŸ‡ͺGermany pminf Nuremburg (Germany), formerly Dresden

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡·Greece s.messaris

    Here is a ptach compatible with 10.2.7

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This came up as daily target for the #bugsmash initative.

    Looking at the summary appears to be missing some sections, specifically what are the steps. Recommend using the standard issue template.

    Also will need some kind of test coverage if a bug.

    Also all fixes should be in MRs.

  • πŸ‡¬πŸ‡§United Kingdom the_g_bomb

    I think I remember that the current tests are falsely passing (without any patch). As I recall, it was a while ago, I think I found that there were tests scenarios that were never activated and as such the tests always just passed, but I could be wrong.

    I think with this new setting I tried to update the tests, to check all the scenarios but found I couldn't get to the point where they could pass.

    Hopefully #32 or #35 have improved that.

    That latest patch doesn't include any test changes at all, I would ignore that and can only assume it is here to get the functionality added to a site without tests.

    I will try to take another look.

  • πŸ‡¬πŸ‡§United Kingdom the_g_bomb

    As this issue was raised as a follow up to #2854884: Not able to disable account cancel confirm e-mail β†’ , which looks like it was fixed in #2854252: User forms broken for admin without 'administer users' β†’ . Hopefully the original tests were fixed there too.

    This issue provides a form that allows the default setting to be changed and used if it is set.

    We will need to check how the changes to the original issue has affected the tests and if they need to be updated to use the default settings.

  • First commit to issue fork.
  • Merge request !11074Notify Cancel Confirm β†’ (Closed) created by mdranove
  • Pipeline finished with Failed
    22 days ago
    Total: 123s
    #411628
  • Pipeline finished with Failed
    22 days ago
    #411632
  • Added a new test, but need to fixup old tests too.

  • Pipeline finished with Failed
    22 days ago
    Total: 652s
    #411712
  • Pipeline finished with Canceled
    22 days ago
    Total: 866s
    #411732
  • Pipeline finished with Failed
    22 days ago
    Total: 1174s
    #411744
  • Pipeline finished with Failed
    20 days ago
    Total: 539s
    #412703
  • Pipeline finished with Failed
    20 days ago
    Total: 169s
    #412812
  • Pipeline finished with Canceled
    20 days ago
    Total: 130s
    #412892
  • Pipeline finished with Failed
    20 days ago
    Total: 97s
    #412893
  • Pipeline finished with Canceled
    20 days ago
    Total: 108s
    #412894
  • Pipeline finished with Failed
    20 days ago
    Total: 504s
    #412895
  • Pipeline finished with Failed
    20 days ago
    Total: 165s
    #412904
  • Pipeline finished with Failed
    20 days ago
    Total: 112s
    #412906
  • Pipeline finished with Failed
    20 days ago
    Total: 135s
    #412912
  • Pipeline finished with Failed
    20 days ago
    Total: 106s
    #412920
  • Pipeline finished with Failed
    18 days ago
    Total: 120s
    #415271
  • Pipeline finished with Failed
    18 days ago
    Total: 508s
    #415272
  • Pipeline finished with Failed
    18 days ago
    Total: 118s
    #415279
  • Pipeline finished with Failed
    18 days ago
    Total: 526s
    #415280
  • Pipeline finished with Failed
    18 days ago
    Total: 519s
    #415289
  • Pipeline finished with Failed
    18 days ago
    Total: 505s
    #415293
  • πŸ‡¬πŸ‡§United Kingdom the_g_bomb

    I think there is some work required in core/modules/user/src/Form/UserMultipleCancelConfirm.php as well.

  • Pipeline finished with Success
    11 days ago
    Total: 553s
    #421139
  • Pipeline finished with Failed
    11 days ago
    Total: 439s
    #421459
  • Pipeline finished with Failed
    11 days ago
    #421582
  • Pipeline finished with Failed
    11 days ago
    Total: 500s
    #421605
  • Pipeline finished with Failed
    11 days ago
    Total: 777s
    #421608
  • Pipeline finished with Failed
    11 days ago
    Total: 498s
    #421621
  • Pipeline finished with Failed
    11 days ago
    Total: 134s
    #421626
  • Pipeline finished with Failed
    11 days ago
    Total: 516s
    #421629
  • Pipeline finished with Success
    11 days ago
    Total: 382s
    #421635
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Left comments on the MR. Seems to contain a number of out of scope changes. If they're all needed to get the tests to just pass then something is probably missing.

    But new config key will need a schema + upgrade path.

    Issue summary still needs some attention.

  • mdranove β†’ changed the visibility of the branch 11.x to hidden.

  • Merge request !11191Notify.cancel_confirm fix. β†’ (Open) created by mdranove
  • Pipeline finished with Failed
    10 days ago
    Total: 148s
    #422724
  • Pipeline finished with Failed
    10 days ago
    Total: 589s
    #422728
  • πŸ‡¬πŸ‡§United Kingdom oily Greater London

    I added thread to the usercancelTest.php. There is a function that makes PHPSTAN fail as it doesnt exist.

  • Pipeline finished with Canceled
    10 days ago
    Total: 218s
    #422739
  • Pipeline finished with Canceled
    10 days ago
    Total: 1750s
    #422742
  • Took another look on a new branch. Should be good now.

  • πŸ‡¬πŸ‡§United Kingdom oily Greater London

    @mdranove You may have had a particular reason? but normally it's best to stick to one branch per issue. Anyway checking your latest changes.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Still appears to be missing default config, schema, and post update.

    Also with the fix being in user module that’s probably where test coverage should be.

  • Pipeline finished with Success
    10 days ago
    Total: 1319s
    #422750
  • πŸ‡¬πŸ‡§United Kingdom oily Greater London

    @mdranove Just ran the test-only test (you have to run it manually). It is passing but it should fail. What that normally means is the test coverage is passing before and after the code fixes in the MR are applied. That is not happening. Changing to 'needs work'.

  • πŸ‡¬πŸ‡§United Kingdom oily Greater London
  • Pipeline finished with Failed
    10 days ago
    Total: 542s
    #422773
  • Pipeline finished with Failed
    10 days ago
    Total: 201s
    #422779
  • Pipeline finished with Failed
    10 days ago
    Total: 1022s
    #422780
  • πŸ‡¬πŸ‡§United Kingdom oily Greater London

    @mdranove I see the test-only test is now failing and only one other test is failing. Worth re-running. For #63 hopefully the test code that seems to work can be moved/ refactored into the user module.

  • Pipeline finished with Success
    10 days ago
    Total: 1191s
    #422800
  • πŸ‡¬πŸ‡§United Kingdom oily Greater London

    Re: #63 There are two tests in the user module.
    Re: #66 The thread has been resolved. Test coverage seems also ready for review. Back to 'Needs review.'

  • πŸ‡¬πŸ‡§United Kingdom oily Greater London
  • Pipeline finished with Success
    9 days ago
    Total: 939s
    #423238
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Also summary is still incomplete.

  • Pipeline finished with Success
    9 days ago
    Total: 554s
    #423266
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Also think we need to think this one through a little now that I'm looking more closely

    'When enabled, the user must confirm the account cancellation via email.'),

    While this does set the checkbox to TRUE the person can still uncheck it.

Production build 0.71.5 2024