? openid_client_ax_hook_modifications_1.patch
? openid_client_ax_hook_modifications_2.patch
Index: openid_client_ax.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_client_ax/openid_client_ax.module,v
retrieving revision 1.2.2.6
diff -u -p -r1.2.2.6 openid_client_ax.module
--- openid_client_ax.module	23 Jun 2009 20:33:34 -0000	1.2.2.6
+++ openid_client_ax.module	24 Jun 2009 10:06:24 -0000
@@ -41,20 +41,23 @@ function openid_client_ax_menu_alter(&$c
 function openid_client_ax_openid($op, $request = array()) {
   // add our information to the request if op is request and we are enabled
   if ($op == 'request') {
+    $request = array();
     $request[sprintf('openid.ns.%s', variable_get('openid_client_ax_alias', 'ax'))] = 'http://openid.net/srv/ax/1.0';
     $request[sprintf('openid.%s.mode', variable_get('openid_client_ax_alias', 'ax'))] = 'fetch_request';
     $short_names = $attributes = array();
-    $attributes = module_invoke_all('openid_client_ax', 'get');
+    $attributes = module_invoke_all('openid_client', 'get');
     foreach ($attributes as $attrib_url) {
-      $parts = explode('/', $attrib_url);
-      $short_names[] = $parts[count($parts) - 1];
-      $request[sprintf('openid.%s.type.'. $parts[count($parts) - 1], variable_get('openid_client_ax_alias', 'ax'))] = $attrib_url;
+      if (strstr($attrib_url, 'axschema.org') !== FALSE) {
+        $parts = explode('/', $attrib_url);
+        $short_names[] = $parts[count($parts) - 1];
+        $request[sprintf('openid.%s.type.'. $parts[count($parts) - 1], variable_get('openid_client_ax_alias', 'ax'))] = $attrib_url;
+      }
     }
     if (count($short_names) > 0) {
       $request[sprintf('openid.%s.if_available', variable_get('openid_client_ax_alias', 'ax'))] = implode(",", $short_names);
     }
+    return $request;
   }
-  return $request;
 }
 
 /**
@@ -118,7 +121,7 @@ function openid_client_ax_authentication
     if (!variable_get('user_email_verification', TRUE) || $account->login) {
       if (user_external_login($account, $_SESSION['openid']['user_login_values']) === TRUE) {
         // Let other modules to save the things to the user
-        module_invoke_all('openid_client_ax', 'save', $response, $account);
+        module_invoke_all('openid_client', 'save', $response, $account);
       }
     }
     else {
@@ -158,7 +161,7 @@ function openid_client_ax_authentication
       // Verify if the user_external_login failed or suceeded
       if (user_external_login($account) === TRUE) {
         // Let other modules to save the things to the user
-        module_invoke_all('openid_client_ax', 'save', $response, $account);
+        module_invoke_all('openid_client', 'save', $response, $account);
       }
     }
     drupal_redirect_form($form, $form_state['redirect']);
