/** * Get user data for the given identity URL. Data is returned as an associative array with the keys: * ID, user_url, user_nicename, display_name * * Multiple soures of data may be available and are attempted in the following order: * - OpenID Attribute Exchange !! not yet implemented * - OpenID Simple Registration * - hCard discovery !! not yet implemented * - default to identity URL * * @param string $identity_url OpenID to get user data about * @return array user data */ function get_user_data($identity_url) { global $openid; $data = array('ID' => null, 'user_url' => $identity_url, 'user_nicename' => $identity_url, 'display_name' => $identity_url); // create proper website URL if OpenID is an i-name if (preg_match('/^[\\=\\@\\+].+$/', $identity_url)) { $data['user_url'] = 'http://xri.net/' . $identity_url; } $result = WordPressOpenID_Logic::get_user_data_sreg($identity_url, $data); return $data; }