_openid_is_xri

6 openid.inc _openid_is_xri($identifier)
7 openid.inc _openid_is_xri($identifier)
8 openid.inc _openid_is_xri($identifier)

Determine if the given identifier is an XRI ID.

2 calls to _openid_is_xri()

File

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

Code

function _openid_is_xri($identifier) {
  // Strip the xri:// scheme from the identifier if present.
  if (strpos(strtolower($identifier), 'xri://') !== FALSE) {
    $identifier = substr($identifier, 6);
  }

  // Test whether the identifier starts with an XRI global context symbol or (.
  $firstchar = substr($identifier, 0, 1);
  if (strpos("=@+$!(", $firstchar) !== FALSE) {
    return TRUE;
  }

  return FALSE;
}
Login or register to post comments