Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6772277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:31:51+00:00 2026-05-26T15:31:51+00:00

I am new to the OpenID logic. I am using the OpenID component for

  • 0

I am new to the OpenID logic. I am using the OpenID component for CakePHP by Cakebaker, with the PHP OpenID library by JanRain.

It’s all working quite well, but I could not find an exhaustive way to retrieve user informations depending on provider and method (sreg vs. ax). So this is what I came up with:

if ($axResponse) {
    if (is_array($a = $axResponse->get('http://axschema.org/contact/email'))) {
        $user_record['email'] = $a[0];
        if (is_array($b = $axResponse->get('http://axschema.org/namePerson'))) {
            $user_record['nickname'] = $b[0];
        }
    } else if (is_array($a = $axResponse->get('http://schema.openid.net/contact/email'))) {
        $user_record['email'] = $a[0];
        if (is_array($b = $axResponse->get('http://schema.openid.net/namePerson'))) {
            $user_record['nickname'] = $b[0];
        }
    }
} else if ($sreg) {
    if (isset($sreg['email'])) {
        $user_record['email'] = $sreg['email'];
    }
    if (isset($sreg['nickname'])) {
        $user_record['nickname'] = $sreg['nickname'];
    }
}

Although I tested it successfully with Google, Yahoo! and AOL’s OpenID, I’m sure I would run into trouble with other / smaller providers. Is there a better and nicer way to achieve the same result? This seems particularly flawed if I try to fetch other optional fields…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:31:52+00:00Added an answer on May 26, 2026 at 3:31 pm

    Please keep in mind that OpenID is a standard for user authentication, not for authorization for data access. You can, naturally, get certain user info using OpenID, but it’s not the protocol’s primary intent. OAuth is the standard for authorization and you might want to start with that, if fetching user data is what you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm quite new to OpenId and I'm having a bit of a problem understanding
I am using the Zend_OpenId_Consumer to provide OpenID access, the login is working fine,
I am using PHP and the codeigniter framework for a project I am working
I've been using Janrain engange for quite a while and have been quite happy
I've been using DoNetOpenAuth library and followed the example here The authentication is working,
I'm new to the OpenID concept and recently tried implementing an OpenID Library for
I'm trying to create a user management system using steam openid, but I'm not
I'm trying to implement OpenId login for a web application. Whenever new user who
New to javascript/jquery and having a hard time with using this or $(this) to
I'm working on an intranet django project (not using GAE) for a company that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.