#redirect won't work with user registration

alexis - April 3, 2007 - 14:53
Project:Drupal
Version:6.x-dev
Component:user.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

AttachmentSizeStatusTest resultOperations
user_redirect_0.patch759 bytesIgnoredNoneNone

#1

RobRoy - April 3, 2007 - 19:57

Good catch. +1

#2

drumm - April 8, 2007 - 01:21
Version:5.x-dev» 6.x-dev

Committed to 5. Should go in HEAD.

#3

Dries - April 9, 2007 - 13:45
Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks.

#4

Anonymous - April 23, 2007 - 13:47
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.