Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When the account for user #1 is edited, the user who is editing it should get a warming, for example the following one.
Be careful, you are editing the admin user. Changes made here could lock you out of your site completely.
Comment | File | Size | Author |
---|---|---|---|
#49 | interdiff_46-49.txt | 1.9 KB | pooja saraah |
#49 | 19879-49.patch | 3 KB | pooja saraah |
| |||
#46 | interdiff_40-46.txt | 2.47 KB | dharmeshmertwal |
#46 | 19879-46.patch | 2.53 KB | dharmeshmertwal |
#40 | 19879-40.patch | 815 bytes | dharmeshmertwal |
Comments
Comment #1
bdragon CreditAttribution: bdragon commentedStill relevant.
Comment #2
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedI can't find any Rules page in Drupal core, but there is still no help text for user/1/edit, so still a valid issue in Drupal 7.4.
Comment #3
Devin Carlson CreditAttribution: Devin Carlson commenteduser/1/edit is just the Edit profile page. Is there any reason to have help text on this page that is not the same as on every user/%/edit page?
If text should be added, what should it be?
Comment #4
joachim CreditAttribution: joachim commented> user/1/edit is just the Edit profile page. Is there any reason to have help text on this page that is not the same as on every user/%/edit page?
Something saying 'This is the admin user. Changes made here could lock you out of your site completely.' might be handy here.
Comment #8
xmacinfoHaving a warning (or help text) about User 1 would be nice.
Is there any UX enhancement planed for the user profile edition form?
Comment #9
jcnventura CreditAttribution: jcnventura at Wunder commentedThis patch displays the warning in the issue summary in user/1/edit.
Comment #10
Buoro.Angelo CreditAttribution: Buoro.Angelo at Azri Solutions commentedI Reviewed the patch and the "warning" message is:
Warning message Be careful, you are editing the admin user. Changes made here could lock you out of your site completely.
It works great.
Comment #11
jcnventura CreditAttribution: jcnventura at Wunder commentedTo the committers: Note that this patch was part of sprint mentoring to @Buoro.Angelo. I wrote the patch while showing him how to write patches, and he provided some input to the code. Please assign credit to him.
Comment #12
jcnventura CreditAttribution: jcnventura at Wunder commentedComment #13
lauriiiComment #14
Bojhan CreditAttribution: Bojhan as a volunteer and commentedThis is not in line with our UI standards, were we explicitly avoid words such as "Please" and/or other forms of asking the user to apply a certain emotional state.
If users are logged in with this account it makes sense, in all other cases I am not sure about special casing it?
We can do something much more friendly and more explicit about which change might lock them out?
Comment #17
daniel.nitsche CreditAttribution: daniel.nitsche at Modules in Depth commentedComment #18
deepakkumar14 CreditAttribution: deepakkumar14 as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedDrupal_set_message is deprecated and replaced by Messenger service.
Comment #19
heykarthikwithuYes, drupal_set_message could be replaced with Messenger service.. Bit of amend in the #18 patch since it includes .lock file changes as well..
In #9 drupal_set_message is added, instead Messenger Service is amended..
Comment #20
heykarthikwithuComment #27
ranjith_kumar_k_u CreditAttribution: ranjith_kumar_k_u at Zyxware Technologies commentedRe-rolled for 9.2
Comment #28
sonam.chaturvedi CreditAttribution: sonam.chaturvedi at QED42 for Drupal India Association commentedComment #29
sonam.chaturvedi CreditAttribution: sonam.chaturvedi at QED42 for Drupal India Association commentedVerified and tested patch#27. Patch applied successfully.
Testing steps:
1. Login as admin, after applying patch
2. Goto "/user/1/edit" page
3. Check warning message "Be careful, you are editing the admin user. Changes made here could lock you out of your site completely." is displayed.
Test Result: Warning message "Be careful, you are editing the admin user. Changes made here could lock you out of your site completely." is displayed on "/user/1/edit" page
RTBC +1
Comment #30
guilhermevp CreditAttribution: guilhermevp at CI&T commentedHi @sonam.chaturvedi, thanks for the review! There is no need to assign yourself doing reviews cause issue may need multiple reviews to assure quality or discuss matters of the solution - especially in core. That said, very nice and detailed review!
I'm adding +1 to RTBC, tested it, works as intended and is a nice warning to have and helps user inclusiveness.
Comment #31
xmacinfoPlease switch to RTBC whenever you feel that you reviewed and tested the patch.
Based on #29 and #30, switched to RTBC.
Comment #32
quietone CreditAttribution: quietone as a volunteer commentedReading the issue I don't see that this point from from the usability review in #14 has been addressed.
And I must admit I had the same thought when I read the message.
And should this be changed in anticipation of #540008: Add a container parameter that can remove the special behavior of UID#1?
Comment #34
guilhermevp CreditAttribution: guilhermevp at CI&T commentedTaking in consideration comment #33, should we wait the commit of issue #540008: Add a container parameter that can remove the special behavior of UID#1, to update this documentation accordingly?
Comment #35
vikashsoni CreditAttribution: vikashsoni as a volunteer and at Zyxware Technologies commentedApplied patch working fine and applied successfully
After patch warning message added successfully.
For ref sharing screenshots.....
Comment #36
quietone CreditAttribution: quietone as a volunteer commented@vikashsoni, Including a screenshot and duplicating the work of others is not necessary and does not help resolve an issue. Therefore removing credit per How is credit granted for Drupal core issues.
Comment #37
heykarthikwithuComment #40
dharmeshmertwal CreditAttribution: dharmeshmertwal as a volunteer and at Srijan | A Material+ Company commentedAdding patch
Comment #41
dharmeshmertwal CreditAttribution: dharmeshmertwal as a volunteer and at Srijan | A Material+ Company commentedComment #42
heykarthikwithu@dharmeshmertwal Instead of using the drupal service directly, best approach is to use Dependency injection and attach messenger service.
Comment #43
apadernoI am changing status as per previous comment.
Comment #44
apadernoI am editing the IS, since this issue isn't about adding help text but showing a warning when the account for user #1 is edited.
Since Drupal introduced the administrator role, should not the warning be shown when the account for a user with that role is edited? By default that is the role assigned to user #1.
Are there edits for which this warning should be shown? I won't show it when the contact settings are changed.
Since Drupal is going to stop to handle user #1 in a special way, does showing this warning still make sense?
Comment #45
cilefen CreditAttribution: cilefen commentedIndeed. As currently written this is a vestigial issue that is wasting contributors’ time.
Comment #46
dharmeshmertwal CreditAttribution: dharmeshmertwal as a volunteer and at Srijan | A Material+ Company commentedAdding new patch
Comment #47
rajandro CreditAttribution: rajandro as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedMoving this backward from Needs Review as the patch has the phpcs error. However, apart from this, the point mentioned on #14 (reminded in #32) has not been addressed yet.
Also, as per the comment on #44 and #45, What can be done to move this forward?
Comment #48
rajandro CreditAttribution: rajandro as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #49
pooja saraah CreditAttribution: pooja saraah at Srijan | A Material+ Company for Drupal India Association commentedFixed Failed Commands against #46
Attached interdiff
Comment #50
cilefen CreditAttribution: cilefen commentedI will begin by removing tags that attract the wrong kind of attention to the issue.
Please stop posting patches here until someone refocuses this issue.
Comment #52
apadernoComment #14 has not been addressed.
If the user #1 account is edited by a user administrator, Changes made here could lock you out of your site completely. does not make much sense, as the edited account is not the account used to log in.