You are here

function shib_auth_redirect in Shibboleth Authentication 7.4

Same name and namespace in other branches
  1. 6.4 shib_auth.module \shib_auth_redirect()

Redirects the user to the handler URL, and handles return option.

Parameters

string $handlerurl: URL of the login / logout handler.

string $return: The path the user will be redirected after Shibboleth processing.

2 calls to shib_auth_redirect()
shib_auth_cancel_custom in ./shib_auth.module
Redirects the user when Cancel button is pressed.
shib_auth_exit in ./shib_auth.module
Implements hook_exit().

File

./shib_auth.module, line 866
Drupal Shibboleth authentication module.

Code

function shib_auth_redirect($handlerurl, $return = NULL) {
  $options = array();

  // recognize, if logout handler contains variables.
  $handler = explode('?', $handlerurl);
  if (isset($handler[1])) {
    parse_str($handler[1], $options);
  }
  if (isset($return)) {
    $options['return'] = $return;
  }
  drupal_goto($handler[0], array(
    'query' => $options,
    'absolute' => TRUE,
  ));
}