openid_redirect_http

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/openid/openid.inc, строка 28

Версии
6
openid_redirect_http($url, $message)

Performs an HTTP 302 redirect (for the 1.x protocol).

▾ 1 функция вызывает openid_redirect_http()

openid_begin in modules/openid/openid.module
The initial step of OpenID authentication responsible for the following: Perform discovery on the claimed OpenID. If possible, create an association with the Provider's endpoint. Create the authentication request. Perform the appropriate redirect.

Код

<?php
function openid_redirect_http($url, $message) {
  $query = array();
  foreach ($message as $key => $val) {
    $query[] = $key .'='. urlencode($val);
  }

  $sep = (strpos($url, '?') === FALSE) ? '?' : '&';
  header('Location: '. $url . $sep . implode('&', $query), TRUE, 302);
  exit;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему