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.
The user registration settings page shows this list of options:
- Only site administrators can create new user accounts.
- Visitors can create accounts and no administrator approval is required.
- Visitors can create accounts but administrator approval is required.
A more logical order - from full control to no control - would be:
- Only site administrators can create new user accounts.
- Visitors can create accounts but administrator approval is required.
- Visitors can create accounts and no administrator approval is required.
Comment | File | Size | Author |
---|---|---|---|
#12 | 168437_user_registration_settings.patch | 3.74 KB | stBorchert |
#12 | 168437_user_registration_settings.png | 14.87 KB | stBorchert |
#7 | user_admin_inc.patch | 5.42 KB | stBorchert |
#3 | user.admin_.inc_.patch | 2.23 KB | gaele |
user.module_75.patch | 2.2 KB | gaele | |
Comments
Comment #1
gaele CreditAttribution: gaele commentedPatch sucks. The default array number is all over the place and should be adjusted as well.
Please have a look at http://drupal.org/node/174972 before I create a new patch.
Comment #2
cosmicdreams CreditAttribution: cosmicdreams commentedAre you still working on this gaele?
Comment #3
gaele CreditAttribution: gaele commentedThis should do it.
Comment #4
catchI agree with the reording, and the patch achieves that, but there ought to be a cleaner way to do it than this:
- '#options' => array(t(
+ '#options' => array('0' => t(
Comment #5
gaele CreditAttribution: gaele commentedYes, it's kinda ugly. The problem is backward compatibility. Currently:
1. The options are in an array.
2. The array order is the order in which the options are shown on the page.
3. The index of the chosen option is saved in the database.
This means that thousands of Drupal sites are tied to the currently used array order. The patch keeps the array order, while swapping the presentation order.
Comment #6
bkinsey CreditAttribution: bkinsey commentedAt first I thought gaele's patch didn't work because although it changes the order on the admin/user/settings page, it also changes my selection when I refresh the page.
But I discovered if I navigate away from the page (admin/user/roles) and then back to it, it preserves my selection as expected.
So consider this feedback from one inexperienced patch tester that I think that gaele's patch works.
Aloha,
Benjamin
Comment #7
stBorchertHere is a new patch that additionally changes the order of the fieldsets in "User e-mail settings". Previously it was
Now it is
greetings,
Stefan
Comment #8
catchI agree 100% with the changes, but I'm pretty sure the re-ordering should be done with an upgrade to that field in the variables table, rather than in the presentation layer.
system_update_6034 does this with a permission, would probably need a couple of switch/if statements to do the same thing to the variable. Leaving as review since I could be wrong on this.
Comment #9
PanchoI agree with catch. We don't want to carry legacy code with us, if it is easily avoidable.
Otherwise +1 for both changes (user registration and user email settings)
Comment #10
gaele CreditAttribution: gaele commentedComment #11
Bojhan CreditAttribution: Bojhan commentedSo we all agree, lets get this in and if Dries or webchick doesn't by then just fix the other laying around.
Comment #12
stBorchertOk, so I flipped "no approval required" and "admin approval required".
Do we need to update the saved values, too? Or leave them as they are?
Comment #13
Dries CreditAttribution: Dries commentedIt looks like we are not renaming variables, just shuffling the existing variables around. If that is correct, this patch can be committed as is.
Comment #14
stBorchertExactly. The patch is just changing the displayed order of the variables.
Comment #15
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.