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.
After successfully registering, user_register_submit()
redirects the user away from the registration page, unless administrator approval is required. I believe this case should be handled the same way so as not to confuse users by making them think they need to fill out the form a second time. It would be better for them to go back to the frontpage and read the message from drupal_set_message()
there. Trivial patch attached.
Thanks,
Matt
Comment | File | Size | Author |
---|---|---|---|
user.module_74.patch | 697 bytes | mvc | |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedIt'd be good to role the patch to 6.x and HEAD as well. I'll be testing this patch later this week.
Was there a reason for
return '';
instead ofreturn;
?Comment #2
mvcearnie, I wrote
return '';
only because I copied that line of code from the case where no administrator approval is required, a few lines above. Since that worked, I didn't actually check to see if those two return values are treated differently (I hope not, that would be confusing).I agree that this would be good to apply to HEAD and 6.x; I would have indicated that but it doesn't seem possible to set multiple versions when creating an issue.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedThe return question isn't covered in the standards so it should be fine but in PHP speak they both give a value of NULL.
The patch to differing versions. I've seen this handled two ways, one is to push for the patch in one particular version and wait until the patch is accepted and reroll the patch using the same issue for other versions. The other is to just open another issue for the different versions and reference the other issues in the new ones.
Marking as RTBC to see what committer thinks.
Comment #4
mvcI've submitted the same issue against 6.x: http://drupal.org/node/168261
Comment #5
drummCommitted to 5.x.
Comment #6
(not verified) CreditAttribution: commented