You are here

function openid_test_redirect in Drupal 7

Menu callback; redirect during Normalization/Discovery.

1 string reference to 'openid_test_redirect'
openid_test_menu in modules/openid/tests/openid_test.module
Implements hook_menu().

File

modules/openid/tests/openid_test.module, line 236
Dummy OpenID Provider used with SimpleTest.

Code

function openid_test_redirect($count = 0) {
  if ($count == 0) {
    $url = variable_get('openid_test_redirect_url', '');
  }
  else {
    $url = url('openid-test/redirect/' . --$count, array(
      'absolute' => TRUE,
    ));
  }
  $http_response_code = variable_get('openid_test_redirect_http_reponse_code', 301);
  header('Location: ' . $url, TRUE, $http_response_code);
  exit;
}