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

CommentFileSizeAuthor
user.module_74.patch697 bytesmvc
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

It'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 of return;?

mvc’s picture

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

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

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

mvc’s picture

I've submitted the same issue against 6.x: http://drupal.org/node/168261

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 5.x.

Anonymous’s picture

Status: Fixed » Closed (fixed)