function openid_normalize

openid_normalize($identifier)

Normalize the given identifier.

The procedure is described in OpenID Authentication 2.0, section 7.2.

File

modules/openid/openid.inc, line 282
OpenID utility functions.

Code

function openid_normalize($identifier) {
  $methods = module_invoke_all('openid_normalization_method_info');
  drupal_alter('openid_normalization_method_info', $methods);

  // Execute each method in turn, stopping after the first method accepted
  // the identifier.
  foreach ($methods as $method) {
    $result = $method($identifier);
    if ($result !== NULL) {
      $identifier = $result;
      break;
    }
  }

  return $identifier;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!openid!openid.inc/function/openid_normalize/7.x