Problem/Motivation
When users cancel their own account, they're displayed with the message "A confirmation request to cancel your account has been sent to your e-mail address" - which is absolutely correct for this case.
However, when an admin cancels a user account and chooses to e-mail a confirmation request to such user, the same message is displayed - which is not correct. It should be something along the line of "A confirmation request to cancel this user account has been sent to the user’s e-mail address"
When an admin cancels a user account without choosing to e-mail a confirmation request to the user, all is well and a correct message is displayed (user@email.com was deleted).
Steps required to reproduce
- As an admin, click the 'cancel account' link for any user (other than yourself)
- Tick the 'Require e-mail confirmation to cancel account' option
- Click the 'cancel account' button
Expected behavior
The admin should see a message similar to "A confirmation request to cancel this user account has been sent to the user’s e-mail address".
What happened instead?
The admin sees the message "A confirmation request to cancel your account has been sent to your e-mail address" - which would be the expected behaviors if a user was cancelling his/her own account.
This message leads to confusion for admins (who actually reported this bug).
Proposed resolution
In the case where a user is cancelling their own account display the original message. In the case where anyone else is cancelling a user account display the message:
A confirmation request to cancel the account %name has been sent to the user's email address.
Remaining tasks
Review
User interface changes
A new message in the case that one user is cancelling another user's account.
Introduced terminology
None
API changes
None
Data model changes
None
Release notes snippet
| Comment | File | Size | Author |
|---|
Issue fork drupal-2980952
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 #2
jaxtheking commentedComment #4
guypaddock commentedThis still applies to Drupal 8.
Comment #5
guypaddock commentedAttached is an attempt at the start of a patch. This still needs tests.
Comment #6
avpadernoDrupal 8.9.x is in security support only.
Comment #7
aaronmchaleComment #8
vikashsoni commentedApplied patch
after patch user is able to cancel account with-out any email verification message for ref sharing screenshot
Comment #9
vikashsoni commentedComment #10
aaronmchale#3199972: Improve user interface text on the account cancellation screen was just committed, which should help get this moving along.
Comment #11
chetanbharambe commentedVerified and tested patch #5.
Patch applied successfully and there is no difference.
Testing Steps:
# Goto: Appearance -> Apply Seven theme
# Goto: /admin/people
# Edit any user
# Click the 'cancel account' link for any user (other than yourself)
# Check the 'Require e-mail confirmation to cancel account' option
# Click the 'cancel account' button
Expected Results:
# User should see messages like "A confirmation request to cancel this user account has been sent to the user’s e-mail address"
Note: I don't see any difference before and after applying the patch. The same message is appearing.
Please refer attached screenshots for the same.
Looks good to me.
Can be a move to RTBC.
Comment #12
aaronmchaleWe will be discussing this issue at #3244123: Drupal Usability Meeting 2021-10-22 so moving back to NR for now.
Comment #13
aaronmchaleWe reviewed this issue today at #3244123: Drupal Usability Meeting 2021-10-22.
The recommendation was to change the message slightly for canceling the account of another user to add the name of the user instead of the text "the account".
So instead of:
A confirmation request to cancel the account has been sent to the user's email address.It would be:
A confirmation request to cancel %name% has been sent to the user's email address.This issue summary also needs an update as it looks like it comes from Drupal 7.
As a side note I think some of the other changes in the patch are out of scope, mainly:
Comment #17
mstrelan commentedThis is still NW as per #13. I'm not sure about the suggested wording though. For example:
I don't want to be cancelled!
Comment #18
aaronmchaleYeah I wouldn't want to be cancelled either so maybe we need to revisit this 😀
Comment #19
Yogesh Sahu commentedre-rolling patch for 10.1.x
Comment #20
ranjit1032002I had Reviewed the patch and it looks good and working as expected mentioned in comment #19
Comment #21
aaronmchaleIssue needs to go back to usability group for another review, setting back to NR.
Comment #22
rinku jacob 13 commentedI have applied the patch #19. I think it's just a re-roll. It doesn't make any changes on message as per comment #13.
Comment #23
tanuj. commentedAdding a patch addressing the points mentioned in #13, removing out of scope code and updated message wording as per #17 so it doesn't sound weird. Please review.
Comment #24
tanuj. commentedFixed CCF on #23
Comment #26
arunkumarkComment #27
arunkumarkUpdated the patch with test case changes.
Comment #28
arunkumarkComment #32
arunkumarkUpdated the testing scenario fixes.
Comment #34
arunkumarkSeems the fail is random. Keeping to Review.
Comment #35
avpadernoIt should be to cancel the %name account, in the same way it is to the user's email address.
Comment #36
arunkumarkComment #37
arunkumark#35 comment has been addressed with the latest Patch.
Comment #38
smustgrave commented#13 tagged this for issue summary update from the usability meeting at that time. Still needs to happen it seems.
Comment #40
aaronmchaleUsability review
We discussed this issue at #3377568: Drupal Usability Meeting 2023-08-04. That issue will have a link to a recording of the meeting.
For the record, the attendees at today's usability meeting were @AaronMcHale, @Emma Horrell, @benjifisher, @rkoller, @simohell, and @worldlinemine.
We reviewed this in the context of the recent discussion. In comment #13 we recommended the following:
A confirmation request to cancel %name% has been sent to the user's email address.However, it was pointed out that this wording could imply that the person themselves is being cancelled, and to quote @mstrelan in comment #17:
With that in mind, we are now recommending the following wording, which should address the concern and is a slightly variation on the previous recommendation, adding the text "the account":
A confirmation request to cancel the account %name has been sent to the user's email address.We considered a slightly shorter version, without the text "to the user's email address", however while we normally follow the less-is-more principle, we felt it was better to be explicit that the request is indeed being sent to the user's email address.
We also considered a couple of other variations on
account %name, including:account (%name)and%name account, but we felt these were a bit awkward when reading the complete sentence.I should also note that if #3229146: Rename "Account cancellation" to "Account closure" in UI is done, then this wording will change again slightly, replacing the word "cancel" with the word "close".
Also cleaning up the issue summary as it's a bit out of date now.
Comment #41
aaronmchaleUpdated previous comment to note other variations on
account %namethat were considered. I think this still needs an IS update, so leaving that tag.Comment #44
akhil babuThe issue summary is clear and up to date. So removing the tag
. Raising it as a merge request.
I have changed the message to
A confirmation request to cancel the account %name has been sent to the user's email addressas suggested in #40.Comment #45
akhil babuComment #46
sandeep_k commentedHi @Akhil Babu, I've Tested the shared MR-MR !6303 mergeable on Drupal Version- 11.0-dev, The Patch was applied successfully and looks good to me.
Testing Steps:
Testing Results:
After applying the patch, the confirmation message has been changed. RTBC++
Comment #47
larowlanI think the code here is currently not working the way we expect it to, i.e. the condition is always false and therefore the case where the user is cancelling their account is showing the wrong message.
This likely means some of the test changes were not correct
Comment #49
dcam commentedI can confirm that this does need work. The confirmation message is now incorrect when a user cancels their own email address:
Comment #51
dcam commentedComment #52
smustgrave commentedCan the issue summary be flushed out some please
Always recommend to never remove summary heading, even if they don't apply just leave blank or put NA.
Put proposed solution can it be more specific, don't need code but looking at the changes seems to be doing more then just altering the message.
If you are another contributor eager to jump in, please allow the previous poster at least 48 hours to respond to feedback first, so they have the opportunity to finish what they started!
Comment #53
dcam commentedUpdated the issue summary.
Comment #54
smustgrave commentedBelieve feedback on this one has been addressed
Hiding patches since the fix is in the MR
Comment #55
nod_small code improvement needed
Comment #56
smustgrave commentedComment #57
dcam commentedI applied the suggestion and rebased the MR too.
Comment #58
smustgrave commentedFeedback appears to be addressed.
Comment #61
nod_Committed 4760161 and pushed to 11.x. Thanks!