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
  Advanced search   Search tips   Subscriptions
Issue 42: Consumer (client) side: solution to obtain from Google email, first and last name, country and language
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Jun 2011


 
Reported by fili...@grassilli.it, Jun 22, 2011
For those who wants to fetch user data of users using Google openid, here is a patch.
(Attached you'll find a diff)

1) Add this function:
    protected function nsTranslate($field)
    {
	switch($field) {
	    case "email": return("contact/email");
	    case "country": return("contact/country/home");
	    case "firstname": return("namePerson/first");
	    case "lastname": return("namePerson/last");
	    case "language": return("pref/language");
	}
	return($field);
    }
2) In function axParams(), change:
$this->aliases[$alias]='http://axschema.org/'.$field;
to:
$this->aliases[$alias]='http://axschema.org/'.$this->nsTranslate($field);

This should send *FOR GOOGLE* the right openid.ns.ax values in request.
To use it see second attached file




Jun 22, 2011
Project Member #1 mewp...@gmail.com
And why exactly would this be needed?

I've explained how to get data from Google (and other providers) at https://code.google.com/p/lightopenid/wiki/GettingMoreInformation

Is that somehow complicated, or otherwise not understandable?
Jun 22, 2011
#2 fili...@grassilli.it
Sorry, I didn'd find your wiki page: it's very clear :)
Jun 22, 2011
Project Member #3 mewp...@gmail.com
(No comment was entered for this change.)
Status: Invalid

Powered by Google Project Hosting