When user is logging in modules which have implemented hook_openid_ax_client could inject theirs own properties using op "get" and save these properties using op "save".
However when user is logged in and trying to add openid identities through the Openid Identities tab under its account, only "get" op is going to be fired - but injected properties couldn't be processed and saved.
In the patch I introduced new op "add" which is launched after user successfully adds new openid identity.
Desired example usage:
/**
* Implementation of hook_openid_client()
*/
function mymodule_openid_client($op, $response = NULL, $account = NULL) {
switch ($op) {
case 'get':
$mapping = _mymodule_mappings();
return $mapping;
case 'save':
case 'add':
_mymodule_openid_client_save($response, $account);
}
}
Note: The patch could be applied after the patch #1033292-3: Support AX extensions + namespace collision bug.
Comments
Comment #1
wojtha commentedComment #2
xamanu commentedSorry wojtha, but patch is missing. Could you please attach. Thank you!
Comment #3
wojtha commentedAnd month later, here it is...
Comment #4
wojtha commentedAhh, empty patch, so now...
Comment #5
wojtha commented+ various fixes. Previous patch was just straightforward diff. This one has been proven to be working ...
Edit: Sorry, I don't know why but I though you renamed hook_openid_client to hook_openid_client_ax. But you didn't of course (even if it will be more appropriate name but also serious breach - changing the API between minor releases). So lets make another patch...
Comment #6
wojtha commentedWell, now I know why thought this - #1179550: Invalid hook_openid_client call.
I updated the patch to use proper hook name - hook_openid_client.
Comment #7
xamanu commentedThanks! Committed and pushed.
For the Drupal 7 version I'm going to rename the hook to the more appropriate name hook_openid_client_ax.
Comment #8
wojtha commentedHi xamanu, I've downloaded latest dev, but this fix is missing here.
Check this commit, it claims to include this fix, but it doesn't: http://drupalcode.org/project/openid_client_ax.git/commitdiff/99f4140?hp...