You are here

function oa_core_drupal_goto_alter in Open Atrium Core 7.2

Implements hook_drupal_goto_alter

File

includes/oa_core.login.inc, line 68
Code for controlling redirection of login Some of this code comes from the login_destination module

Code

function oa_core_drupal_goto_alter(&$path, &$options, &$http_response_code) {

  // Note that this functionality cannot be backported do 6.x as Drupal 6 does
  // not call drupal_alter for drupal_goto.
  // This actually may be used also by templates.
  if (isset($GLOBALS['destination'])) {
    $destination = $GLOBALS['destination'];

    // alter drupal_goto
    if (is_array($destination)) {
      $path = $destination[0];
      $options = array();
      if (count($destination) > 1) {
        $options = $destination[1];
      }
    }
    else {
      $path = $destination;
    }
  }
}