My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
GettingMoreInformation  
Updated Jan 17, 2011 by mewp...@gmail.com

OpenID has two extensions, called AX and SREG that allow getting more information about an user when authenticating. These extensions are supported. To use them, specify $openid->required and/or $openid->optional before calling $openid->authUrl(). These are arrays, with values being AX schema paths (the 'path' part of the URL). For example:

$openid->required = array('namePerson/friendly', 'contact/email'); $openid->optional = array('namePerson/first');

Since AX attributes are a superset of SREG attributes, they are automatically translated in LightOpenID, so that you don't have to know anything about SREG.

As for the AX attributes, they are defined at axschema.org, But here's a list of the more common ones (copied from axschema.org):

Name Meaning
namePerson/friendly Alias/Username
contact/email Email
namePerson Full name
birthDate Birth date
person/gender Gender
contact/postalCode/home Postal code
contact/country/home Country
pref/language Language
pref/timezone Time zone

Note that even if you mark some field as required, there is no guarantee that you'll get any information from a provider. Not all providers support all of these attributes, and some don't support these extensions at all.

Google, for example, completely ignores optional parameters, and for the required ones, it supports, according to it's website:

  • namePerson/first (first name)
  • namePerson/last (last name)
  • contact/country/home
  • contact/email
  • pref/language

Comment by kAlvaro, Mar 24, 2011

The received data can be read with:

$openid->getAttributes()
Comment by erel...@gmail.com, Apr 14, 2012

Is there any way to get a thumbnail of the user from Google?

Comment by g...@snazzify.com, May 11, 2013

Is there a way to get the user's Yahoo GUID? I can get the $openid->identity but thats not the user's yahoo guid.

posted a question on: http://stackoverflow.com/questions/16503782/how-to-get-the-users-yahoo-guid-using-openid

Comment by testsup...@gmail.com, May 31, 2013

Is there any option to Get birthDate of user from Google??

Comment by rai.akas...@gmail.com, May 6, 2014

I am not getting neither the first name nor the last name what to do

Comment by swati.5...@gmail.com, Jan 2, 2015

I am not able to get users gender, please help..

Powered by Google Project Hosting