function _openid_url_normalize

OpenID normalization method: normalize URL identifiers.

1 string reference to '_openid_url_normalize'
openid_openid_normalization_method_info in modules/openid/openid.module
Implements hook_openid_normalization_method_info().

File

modules/openid/openid.inc, line 315

Code

function _openid_url_normalize($url) {
    $normalized_url = $url;
    if (stristr($url, '://') === FALSE) {
        $normalized_url = 'http://' . $url;
    }
    // Strip the fragment and fragment delimiter if present.
    $normalized_url = strtok($normalized_url, '#');
    if (substr_count($normalized_url, '/') < 3) {
        $normalized_url .= '/';
    }
    return $normalized_url;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.