PHP Classes

Great script, though I wish it would explain how to get the a...

Recommend this page to a friend!

      Simple OpenID PHP Class  >  All threads  >  Great script, though I wish it would...  >  (Un) Subscribe thread alerts  
Subject:Great script, though I wish it would...
Summary:Package rating comment
Messages:3
Author:Bugmenotter
Date:2008-08-10 21:10:24
Update:2008-12-21 03:04:47
 

Bugmenotter rated this package as follows:

Utility: Good
Consistency: Good
Examples: Sufficient

  1. Great script, though I wish it would...   Reply   Report abuse  
Picture of Bugmenotter Bugmenotter - 2008-08-10 21:10:24
Great script, though I wish it would explain how to get the attributes you want from the provider. I recommend adding this to the class file:

function GetAttribute($val) {
return $_GET["openid_sreg_".$val];
}

and using GetAttribute to retrieve the attributes you want. You can use it like this: $openid->GetAttribute('fullname') or $openid->GetAttribute('email')

  2. Re: Great script, though I wish it would...   Reply   Report abuse  
Picture of Steve Love Steve Love - 2008-08-25 07:19:27 - In reply to message 1 from Bugmenotter
You'll find the code to do this in openid-example.php on lines 10 and 11.

Steve Love

  3. Re: Great script, though I wish it would...   Reply   Report abuse  
Picture of Shashank Shashank - 2008-12-21 03:04:47 - In reply to message 2 from Steve Love
Steve, the lines 10 and 11 in the example are to *set* the attributes to the openid server request before the request.

I think the original poster of this thread is asking (and I want to know too) about how to *get* the attributes from the openid server.

If everything goes well, then the example just displays "Valid". How can I make it display all the attributes it has brought back, especially nickname and email address?