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.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gaele’s picture

Patch 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.

cosmicdreams’s picture

Are you still working on this gaele?

gaele’s picture

Project: » Drupal core
Version: » 6.x-dev
Component: usability » user system
FileSize
2.23 KB

This should do it.

catch’s picture

Status: Needs review » Needs work

I 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(

gaele’s picture

Status: Needs work » Needs review

Yes, 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.

bkinsey’s picture

At 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

stBorchert’s picture

FileSize
5.42 KB

Here is a new patch that additionally changes the order of the fieldsets in "User e-mail settings". Previously it was

  • "Welcome, new user created by administrator"
  • "Welcome, no approval required"
  • "Welcome, awaiting administrator approval"

Now it is

  • "Welcome, new user created by administrator"
  • "Welcome, awaiting administrator approval"
  • "Welcome, no approval required"

greetings,

Stefan

catch’s picture

I 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.

Pancho’s picture

I 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)

gaele’s picture

Version: 6.x-dev » 7.x-dev
Status: Needs review » Needs work
Issue tags: +Usability
Bojhan’s picture

So we all agree, lets get this in and if Dries or webchick doesn't by then just fix the other laying around.

stBorchert’s picture

Status: Needs work » Needs review
FileSize
14.87 KB
3.74 KB

Ok, 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?

Dries’s picture

It looks like we are not renaming variables, just shuffling the existing variables around. If that is correct, this patch can be committed as is.

stBorchert’s picture

just shuffling the existing variables around

Exactly. The patch is just changing the displayed order of the variables.

Dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -Usability

Automatically closed -- issue fixed for 2 weeks with no activity.