php - Incorporating Open ID with my current login System? -


I am currently installing OpenID certification on my website and I'm having difficulty with my current login system and database is. .. I wrote this article & amp; It recommends this type of table to store open-end information ...

  create table user_openides (open-end_versal varchar (255) not tap, primary key (openID_arunl), user_id int tap , Index (user_id));  

This is my current user information table

  Userid (primary) | Username (UNIQUE) | Password | E-mail  

Usage is used to refer to user-details for comments, ratings, etc. (This goes as a user identifier in the table of comments and the rating table)

I want a system that uses stack overflow which logs using your open ID And this gives you an anonymous (open-end provider) display name .... while my existing login system has been seamless.
1) How can I add users' open ID details in my existing user-information table without affecting the current login setup?
2) Currently I use User-Id to store the session in order to maintain the login) for each user. What should I do now in case of Open ID?

* My thoughts (I do not know if I am right or not)
- Add an open-id field to each user Store the unique open URL of the ID provided by the Open ID provider and set it to free for non-open-id-users.
- Create a text field and store for the user ID. An MD5 of the Open ID URL (store it in the session to maintain the login).
- I do not know how I can handle the display name / username which is unique to everyone because I know unknown (for people who use open-id) ( I would like to use open-id) which can be changed from profile settings ...

Any suggestions will be helpful .... Thanks

< Div class = "post-text" itemprop = "text">

Consistent with the table layout you show 1: several applications From Gkrtaon is: Opanaids.

In this way, no changes are necessary in the user table.

When someone logs in with an openID, you check that the OpenID is in the OpenIDs table, if so, then you have user_id of the user and you have done it.

Otherwise create a new user (do not set a username / password) and add one (OpenID, User_ID) to the OpenIDs table for them.

You can display whatever good placeholders (such as their OP, or whatever) the template will display, where the user's username will display the username to be empty.

Hopefully you are already rejecting the login with an empty password, so there should not be any security problem.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -