If you modify user settings so that users can choose their own password, automatically login after registration and there's no need for administration approval then you won't be able to override the redirection after registration using $form['#redirect'] from hook_form_alter().

The patch replaces drupal_goto() with return '' in the relevant block of code in user_register_submit(). Now $form['#redirect'] works correctly.

CommentFileSizeAuthor
user_redirect_0.patch759 bytesalexis

Comments

RobRoy’s picture

Good catch. +1

drumm’s picture

Version: 5.x-dev » 6.x-dev

Committed to 5. Should go in HEAD.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)