I've being trying to write custom module that redirects user from user register page after submit. I read several issues on Drupal Offsite and here on Stackexchange, but could not still resolve the issue.
This is my custom module code:
function myregistration_form_user_register_form_alter(&$form,&$form_state){
unset($_GET['destination']);
drupal_static_reset('drupal_get_destination');
$_GET['destination'] = array('query'=>array('q'=>'order_translaton'));
}
The URL of the page I want to redirect to is: http://www.sociofobic.ru/drupal/?q=order_translaton.
After registering user no redirect occurs. Instead I get the NOTICE:
Notice: Array to string conversion in url_is_external() (line 2312 of /home/bnqpdcme/public_html/drupal/includes/common.inc). Notice: Array to string conversion in drupal_parse_url() (line 589 of /home/bnqpdcme/public_html/drupal/includes/common.inc). and Page not found: The requested page "/drupal/?q=Array" could not be found.
Please tell me what I do wrong, because the syntax for URL redirection I use is the same as explained in drupal_redirect_form()
.