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

wojtha’s picture

Assigned: Unassigned » wojtha
Status: Active » Needs review
xamanu’s picture

Status: Needs review » Needs work

Sorry wojtha, but patch is missing. Could you please attach. Thank you!

wojtha’s picture

Status: Needs work » Needs review
StatusFileSize
new0 bytes

And month later, here it is...

wojtha’s picture

Ahh, empty patch, so now...

wojtha’s picture

+ 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...

wojtha’s picture

Sorry, I don't know why but I though you renamed hook_openid_client to hook_openid_client_ax.

Well, now I know why thought this - #1179550: Invalid hook_openid_client call.

I updated the patch to use proper hook name - hook_openid_client.

xamanu’s picture

Status: Needs review » Fixed

Thanks! Committed and pushed.
For the Drupal 7 version I'm going to rename the hook to the more appropriate name hook_openid_client_ax.

wojtha’s picture

Status: Fixed » Needs review

Hi 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...