code: protected function domainGet($identifier)
      {
          if ($identifier === null) {
              return null;
          }
  
          // What are we, email or openid? Split ourself up and get the
          // important bit out.
          if (filter_var($identifier, FILTER_VALIDATE_EMAIL)) {
              $email = explode('@', $identifier);
              return $email[1];
          }
  
          //OpenID
          $url = parse_url($identifier);
          if (!isset($url['host'])) {
              //invalid URL
              return null;
          }
  
          $domain = $url['host'];
          if (isset($url['port']) && $url['scheme'] === 'http'
              && $url['port'] != 80
              || isset($url['port']) && $url['scheme'] === 'https'
              && $url['port'] != 443
          ) {
              $domain .= ':' . $url['port'];
          }
  
          return $domain;
      }
docs: Grab the domain from the identifier.
  
  Extract the domain from the Email or OpenID.
  
  @param string $identifier A string of the email address or openid URL
  
  @return string A string of the domain to use
  
  @since Method available since Release 0.1.0