Profile information from Simple Registration Extension
carsonh - March 1, 2008 - 16:16
| Project: | OpenID |
| Version: | 5.x-1.1 |
| Component: | OpenID SREG |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi there
I am running OpenID version 1.1 with Drupal 5.7. Is there a way to pull user profile data into the user profile from user's OpenID using the Simple Registration Extension?
If so, could you pls point me th way how to set up?
Thanks
carsonh

#1
I'm running into the same situation.
From looking at the module, a couple of things have to be done.
1. implement the hook_openid(). The hook is setup in openid_authentication_request right before the request array is returned. By doing this, you can tell the openid server to return additional information.
2. then in the openid_authentication function, where the response is parsed, add a hook in the elseif (variable_get('user_register', 1)) block to put the response data into the $edit form. Implement the hook and you can now have access to the response array and the user_register form to map the data.
Would something like that work? I'm about to add the hook to see how it would work.
#2
Actually, scratch the #2 comment above. You have access to hook_form_alter, which gets called when node_prepare is called. Implement the user_register case, and thhe response data will be in the $form['#post']['response'] array element. From there, you should everything you need to put in your own profile info.