views:

7

answers:

1

How to people go about managing users when some people login via facebook connect (or openid etc) and other members who actually register on the website.

From what I understand, those logging in via facebook connect will have limited data like just their username correct? You won't have even their email addy.

A: 

When a user logs in for the first time to your site you ask them to grant your app certain permissions. Look at the list of available permissions to have an idea what you have access to.

All you need to store is facebook user id. Everything else can be retrieved from facebook when needed (unless you want to have some caching).

Usually it is convenient to create a regular user account for facebook users, that way facebook and regular users can be treated in a similar way.

Your user table would be something like:

<id>,<username>,<password>,<email>,<facebook_uid>

When user logs in for the first time you ask them to provide a username (or use their real name). Password is getting generated randomly (as it is not used for login) and if you need a email you can prompt for email permissions.

serg

related questions