drupal_goto not working in hook user login I have $u variable which stores the path in hook user login to redirect users to the page.

drupal_goto($u);


I am not being redirected to the page- path $u.
drupal_goto not working.
I have tried everything increased te weight of the module,even tried with $_GET['destination'].
Instead of using drupal_goto(), try passing the path in $edit['redirect'] in hook_user_login as below:

&lt;?php
/** 
 * Implements hook_user_login().
 */
function hook_user_login(&amp;$edit, $account) {
  // To check if the form is not the user reset form.
  if (!isset($_POST['form_id']) || $_POST['form_id'] != 'user_pass_reset') {
    $GLOBALS['destination'] = 'PATH_YOU_WANT_TO_REDIRECT';
  }
}
?&gt;