Closed (duplicate)
Project:
Drupal core
Version:
6.x-dev
Component:
user.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Aug 2006 at 14:49 UTC
Updated:
19 Feb 2008 at 17:23 UTC
The user creation form behavior has changed since 4.7. Now if you submit a user, you are returned to the create user form with form values still filled in!
Attached patch tries to set things back as they were in 4.7- normally redirect to the user admin screen.
| Comment | File | Size | Author |
|---|---|---|---|
| user_register_destination_0.diff | 2.52 KB | pwolanin |
Comments
Comment #1
pwolanin commentedsetting status
Comment #2
webchickHey, that was my patch that changed that behaviour. :P I like it the way it is because you can add multiple users at once more easily, and because it is consistent with how terms and other things in Drupal are added.
The pre-populating of username and email with old values when directed back to admin/user/user/create is a new thing though, is definitely a bug, and should be taken out. Marking code needs work, as that problem should be addressed instead.
Comment #3
webchickOh, looks like there is already an issue for this bug: http://drupal.org/node/79804
Marking as won't fix.
Comment #4
webchickRe-classifying.
Observed behaviour is caused by http://drupal.org/node/79614. Marking as a duplicate.
Comment #5
pwolanin commentedI don't think this is a duplicate. The problem occurs on the user creation form, not the login form. The referenced patch seems to fix the problem of the form values remianing, but not of going back to the user creation form itself.
At the very least, the lines:
seem to need to be removed (or changed) since if this redirect was desireable, by looking at form.inc the proper element would be $form['#redirect'].
Comment #6
drummIt looks like this patch changes the page which we redirect to for both admin registrations and self-registrations.
For admins-
I think we should redirect to the user listing page because that shows that the new user has been created and is in the list. The only place we redirect to the same form that was just filled out that I can think of is taxonomy terms, so I don't think there is an established convention for this behavior. We also need to look at how frequently people add one user vs. adding multiple users. My rough and not-supported-by-data guess is that the singletons happen more.
For self-registrations-
The next step for the user is (hopefully) logging in using the information provided via email. The user should be at the login form. It looks like it goes to the front page in this patch.
Comment #7
webchickFWIW, here's the original issue:
http://drupal.org/node/62855
I set destination per Moshe, as he brought up a good point about calling the registration part from external modules.
As long as the bloody form doesn't redirect back to the user list everytime you add a new user, though I'm cool with whichever. :P
Comment #8
webchickAdding multiple users from the admin panel happens more often than you'd think, for example:
1. When you want to add your fellow development team members to a site you're working on.
2. When you're testing a site (or testing patches), and want to quickly make a few users: one with 'normal' permissions, one with role X, one with role Y, etc.
3. When you have site registrations closed, you need to add *all* members to the site this way.
The "singleton" case seems to be going through the actual user registration form. I'm having a difficult time figuring out when you would just add one user, unless your site was extremely small.
So I'd prefer to see this "fixed" in one of two ways:
1. A more descriptive drupal_set_message that says, "User account bob was created. No e-mail was sent."
2. A checkbox on this form that basically says, "Add another user" and, if set, will return to this form.
Comment #9
pwolanin commentedI thnik webchick got a patch in to make the message link to the created user.
Comment #10
tommo commentedCould you explain to me the difference between:
$form['destination'], $form['#action'] and $form['#redirect'] ?
I've been setting the #redirect for most forms but I can not get it to work in the 'user_register' form and my modules have to edit the $form['destination'] field for it to work.
What should be the most appropriate method?
(supplied with enough info on the differences between the fields I will create a handbook guide on 'redirecting forms correctly' as I beleive this topic to be quite vague)
Comment #11
nosro commentedThat would be great if you get enough info to create a handbook page. I have been having trouble redirecting from the user registration form. I'll try the $form['destination'] now.
Comment #12
nosro commented