Hi! I'm having problems with a small OpenID-library called LightOpenID . I can authenticate to almost all providers, but I don't know how to fetch the data from the provider. I only get Array(), eaven with print_r().
+3
A:
You need to call getAttributes()
after $openid->validate()
not before.
Remember:
Note that it does not guarantee that any of the required/optional parameters will be present
Pete
2010-07-05 13:18:09
I've done like this now: http://pastebin.com/ULsLvhxpSo to display the email, do I use $foo['email']?
Grozzy
2010-07-05 13:56:39
It'll be `$foo['contact/email']` - as per the docs, the attributes are mapped to the AX format.
Pete
2010-07-05 14:20:42
Also, `$openid->required = array('contact/email');` needs to be called **before** `$openid->validate()`
Pete
2010-07-05 14:27:31
http://pastebin.com/Xrhh7Ukb - Still not working, I'm pretty sure it should show some nickname or email.
Grozzy
2010-07-05 14:40:26
You've got `$openid->validate();` twice. Also, as mentioned, there's no guarantee that the OP or user exchanges the information.
Pete
2010-07-05 15:05:50
http://pastebin.com/wV1jv0jF http://pastebin.com/YcQv2Hvf
Pete
2010-07-05 15:12:52
AH, well thank you! :)
Grozzy
2010-07-05 15:26:23