I am having difficulty getting drupal to redirect a user to a specific page after completing the registration form.
In the user.module file there is this:
// No e-mail verification required; log in user immediately.
elseif (!$admin && !variable_get('user_email_verification', TRUE) && $account->status) {
_user_mail_notify('register_no_approval_required', $account);
$form_state['uid'] = $account->uid;
user_login_submit(array(), $form_state);
drupal_set_message(t('Registration successful. You are now logged in.'));
$form_state['redirect'] = '';
}
I would have assumed that by entering the path you wish to redirect to, in the form redirect ,it would redirect. For example:
$form_state['redirect'] = '/page/I/Want/To/Redirect/To';
However this is not the case. When the user is logged in after completing the registration form they are taken to the homepage.
Once the user is logged in (from the registration form) I wish to send them to our services page. But for them to be sent to the homepage every subsequent time they login.