Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>when a user clicked on 'Login with Google' button on 'example-google.php page you will be redirected to google and if user accept the request he will be redirected to your page again and you can get only the Openid of user.</p> <p>But if you want to get some other info or change the OpenID provide you can to it on this way:</p> <pre><code>&lt;?php require 'openid.php'; try { $openid = new LightOpenID; if(!$openid-&gt;mode) { if(isset($_GET['oidType'])) { $oidType = $_GET['oidType']; $openid = new LightOpenID; if ($oidType==1) { $openid-&gt;identity = 'https://www.google.com/accounts/o8/id'; } else { $openid-&gt;identity = 'https://me.yahoo.com '; } $openid-&gt;required = array( 'namePerson', 'namePerson/first', 'namePerson/last', 'contact/email', ); $openid-&gt;returnUrl = 'http://www.yourdomain.com/login.php'; header('Location: ' . $openid-&gt;authUrl()); } ?&gt; &lt;a href="?oidType=1"&gt;Login with Google&lt;/a&gt; &lt;a href="?oidType=2"&gt;Login with Yahoo&lt;/a&gt; &lt;?php } elseif($openid-&gt;mode == 'cancel') { echo 'User has canceled authentication!'; } } elseif($openid-&gt;validate()) { $openid_identity = $openid-&gt;identity; $data = $openid-&gt;getAttributes(); $email = $data['contact/email']; $namePerson = $data['namePerson']; $first = $data['namePerson/first']; $last = $data['namePerson/last']; echo "Openid:$identitystr &lt;br&gt;"; echo "Email : $email &lt;br&gt;"; echo "namePerson : $namePerson &lt;br&gt;"; echo "first : $first &lt;br&gt;"; echo "last : $last &lt;br&gt;"; } else { echo "The user has not logged in"; } } catch(ErrorException $e) { echo $e-&gt;getMessage(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload