Welcome Guest, Not a member yet? Register   Sign In
Facebook and Standard Codeigniter Login
#1

[eluser]Keylocker[/eluser]
Here's the deal:
I have my CI 2 application that has its user table with pretty much standard data:
Code:
user_id
fb_uid (Facebook User ID)
fb_username (Facebook user name i.e. http://facebook.com/username)
first_name
last_name
gender
email
password

As you can see, a user can login with the standard login form (email/password) or connecting with Facebook.

My problem is that,
1) If a user has got a standard account on the site and the next time he logins with Facebook, I need to complete his information adding
Code:
fb_uid
and
Code:
fb_username
to his row in the user table.

2) If a user arrives to the site for the first time and logins with Facebook, I need to add his Facebook information to the table and take him to a page that allows him to set his password.

How could I do that avoiding duplicates? I mean.. preventing a user to have two table rows (one with user_id, first_name, email, etc) and another row just with Facebook information?

I know this is really poorly explained so please don't refrain to ask questions.
Thanks.
Mike


Messages In This Thread
Facebook and Standard Codeigniter Login - by El Forum - 04-24-2012, 03:23 AM
Facebook and Standard Codeigniter Login - by El Forum - 04-24-2012, 04:57 AM
Facebook and Standard Codeigniter Login - by El Forum - 04-24-2012, 04:59 AM
Facebook and Standard Codeigniter Login - by El Forum - 04-24-2012, 05:48 AM
Facebook and Standard Codeigniter Login - by El Forum - 04-24-2012, 01:31 PM
Facebook and Standard Codeigniter Login - by El Forum - 04-25-2012, 10:11 AM
Facebook and Standard Codeigniter Login - by El Forum - 04-25-2012, 11:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB