I had to change the hook system a little bit and added Sreg client side support.
The patch below includes #441034: Can't delete mappings that are defined in code as well.
The hook change:
openid_cp_field_openid_client_ax() -> openid_cp_field_openid_client_sreg()

Comments

aron novak’s picture

Status: Active » Needs review
aron novak’s picture

Status: Needs review » Needs work
StatusFileSize
new7.19 KB

I added more robust existing-profile searching and did some refactoring to make the code simplier.
I tested it a little bit, I could map some of the fields, but not all of them, i need to make sure that the patch below really works sane.

aron novak’s picture

Status: Needs work » Needs review
StatusFileSize
new7.19 KB

in #2 non-CCK fields weren't filled.

aron novak’s picture

StatusFileSize
new7.36 KB

in #3, SReg fields weren"t handled properly.
Also really tiny coding style issues were fixed.

alex_b’s picture

Status: Needs review » Needs work

#4 does not apply anymore after recent commits (#441034: Can't delete mappings that are defined in code ? )

aron novak’s picture

Status: Needs work » Needs review
StatusFileSize
new6.23 KB

Re-rolled. Basically it was all because it included #441034.

alex_b’s picture

openid_cp_field_get_mapping($mapping, $type);
+    $mapping_sreg = array();
+    openid_cp_field_get_mapping($mapping_sreg, $type .'_sreg');
+    $mapping += $mapping_sreg;

This looks funny. Can you explain what the convention around $type .'_sreg' is?

(edit: i just see that this has been introduced with an earlier patch)

aron novak’s picture

#7:
Not related to this patch, but agree. , see #501896: Change signature of openid_cp_field_get_mapping()

aron novak’s picture

StatusFileSize
new11.4 KB

Here is the patch without ugly the '_sreg' style.
The '_sreg' naming was used before, but because it's all about client side sreg integration, it's not unrelated to the patch's scope.

alex_b’s picture

Just did a quick test. I mix SREG and AX (SREG full name maps to node title, AX first, last name and bio map to 2 cck fields and the node's body) -> no profile is being created on first time log in. Need to do more digging. I suspect there is a problem with the set up.

alex_b’s picture

Status: Needs review » Reviewed & tested by the community

#10 was my fault: didn't configure the provider to expose SREG data - can't use SREG on the relying party then obviously!

alex_b’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.