function hook_drupal_goto_alter

hook_drupal_goto_alter(&$path, &$options, &$http_response_code)

Change the page the user is sent to by drupal_goto().

Parameters

$path: A Drupal path or a full URL.

$options: An associative array of additional URL options to pass to url().

$http_response_code: The HTTP status code to use for the redirection. See drupal_goto() for more information.

Related topics

File

modules/system/system.api.php, line 3886
Hooks provided by Drupal core and the System module.

Code

function hook_drupal_goto_alter(&$path, &$options, &$http_response_code) {
  // A good addition to misery module.
  $http_response_code = 500;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_drupal_goto_alter/7.x