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 6329151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:35:59+00:00 2026-05-24T17:35:59+00:00

I have added simpleopenidselector and lightopenid to my Yii web app and it does

  • 0

I have added simpleopenidselector and lightopenid to my Yii web app and it does authenticate the user and it returns a url with openid data. The next step is to use the data from the OpenID provider to create a new identity in Yii to log in the user. How is this done with Yii?

Also, I think I need to create an openid table in order to store the openid’s and also need to add the user to my user table. If the user has an account already then add the openid to their user account to prevent multiple accounts.

Has anyone achieved all of this with Yii? If so, I would be very interested in how it was accomplished.

  • 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-24T17:36:00+00:00Added an answer on May 24, 2026 at 5:36 pm

    To use the data from openID as Yii login, you could modify/overwrite the UserIdentity Class (protected/components).

    Overwrite the existing authenticate method.
    At this point you also can set the current Yii username, like:

    $this->username=$openId->username
    

    (where $openId->username should be replaced by the variable which contains the openID user name)

    By overwriting the side/login action, you can call your modified method, like this:

    $identity=new UserIdentity("m","m");//where m is dummy
    if($identity->authenticate()) {
               Yii::app()->user->login($identity);
    [...]
    }
    

    //Update (because of your comment):
    Not sure, if I understand your problem right. But what’s about adding a new method in UserIdentity, like authenticateOID(). call this method at the beginning of the original authenticate() method, like so:

    if ($this->authenticateOID) {/*set username & return true to end the method here*/}
    else {/*original authenticate method from Yii*/}
    

    Inside authenticateOID() you check if OID authentication is done and/or if the user still in you local “OID – user table”

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

Sidebar

Related Questions

I have added Two Factor Authentication to my Mobile ASP.Net Web App. When the
I have added the following block of code to my WP7 app and not
I have added a few buttons to self.view. When the user clicks on one
i have added an additional admin user and created a role for it, allowing
I have added try catches in my site which work great. The next part
I have added a navigation controller in iphone app from my home screen it
I have added an action sheet in my app. My application is tab bar
I have added a textbox to my WinMo app's form and I want to
I have added jquery js file to a web page in .NET 1.1 web
I have added a custom action to the CustomList type. For testing purposes I

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.